Update model from database in entity framework is not working

c# entity-framework

Question

If any modifications have been made to the datatype or constraints (such as not null - null) of a specific column in a table, and if any actions have been takenUpdate model from database Entity Framework's (Refresh a specific table) command does not update the entity model.

I have to manually delete and create the table each time.

Is this the only remedy? or is there a better way to go about it?

1
4
3/13/2014 7:35:04 AM

Accepted Answer

the relevant table or tables from yourmodel then chooseUpdate model from database , EF typically just scans for newly added fields, not altered fields.

9
3/13/2014 8:09:40 AM

Popular Answer

Verify whether the newly updated or created database table has an identity key field (like an ID column). When working with tables that don't express uniqueness in their records, Entity Framework is particularly sensitive.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow