Updating Database model (.edmx) Model First

ef-model-first entity-framework

Question

I am having a few problems with updating the model in EF using Model First.

I have exhausted my efforts with the suggestions of adding migrations (which is normally done using Code First).

The Package Manager Console prints the message

Creating a DbModelBuilder or writing the EDMX from a DbContext created using Database First or Model First is not supported. EDMX can only be obtained from a Code First DbContext created without using an existing DbCompiledModel.

I have also tried this suggestion

Updating model in EF Database First project

However nothing happens when i click "Run Custom Tool"

Any suggestions please on how to update the model to reflect the changes that have been added to the database.

1
4
5/23/2017 12:13:40 PM

Accepted Answer

Open your model right click and you will find an option Update Model from database

enter image description here

Click update model from database than a window will open like this:

enter image description here

So choose the modified table to update them in model.

8
3/22/2018 8:15:29 AM


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