Updating a model from a database within an entity does not work

If any changes have occurred in the data type or restrictions (for example, not null-null) of a particular column in the table and execution Update model from database(Refresh specific table) in the entity infrastructure does not update the entity model.

Every time I have to delete and recreate the table manually.

Is this the only solution? or any other better way to do this?

+4
source share
2 answers

delete the corresponding tables from model, than select Update model from database, EF usually checks only new fields, not changes to existing fields.

+8
source

, / (, ). Entity Framework , .

+1

Source: https://habr.com/ru/post/1531487/


All Articles