entity framework - Why do I get "unable to generate the model" errors when adding tables in EF? -


working in team environment, created tables needed add (ef database first design).

i chose "update model database...", selected new tables, , got obscure error message:

unable generate model because of following exception: 'the value column 'datatype' in table 'tabledetails' dbnull.     unable cast object of type 'system.dbnull' type 'system.string'. '. 

this caused trying add table no primary key. update tables have primary key , shouldn't error anymore.

it nice if error made clear. nice if remembered set primary keys on tables when created them.

hopefully save others fruitless efforts had of searching answer.


Comments