How can I update the ADO.NET Entity Data Model quickly?

ado.net c# entity-framework sql

Question

I am using ADO.NET Entity Data Model in my C# project. There is an ADO.NET Entity Data Model that is generated on the DB in my project. How do I quickly refresh the ADO.NET Entity Data Model based on DB changes? I have been deleting the model and then creating a new one. I believe that there is a more simple and quick way.

1
5
8/21/2014 2:23:41 PM

Accepted Answer

Right-click on the model designer and choose "Update Model from Database", and a dialog box will pop up. Click OK and your model will be refreshed.

FYI, I'm using EF 4.0, and I skipped the earlier version, so I can't tell you what it's like in VS 2008.

5
12/16/2010 10:53:58 PM

Popular Answer

I always Ctrl-A (to select everything), the press delete, and then create model from database from scratch - update just doesn't work right in a lot of cases. At least in EF4 / VS2010 that I am developing in/with.



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