views:

391

answers:

2

Hi, Does anyone know what the esiest way to update the entity model after adding/deleting the fields in the database?

I am adding a few new fields to my database, then choose "Update Model from DB" and nothing happens. The model stays intact. Did anyone encounter the same problem?

Thanks for any feedback!

+1  A: 

With EF that shipped for .net 3.5 I tend to follow the following steps:

  1. Delete the connectionstring
  2. Delete the model
  3. Generate a new model
  4. Build solution

This is perhaps not a very solid approach but it saves me time in the long run. In the future it is easier and more stable to do a refresh but I have gone from autogenerating my model to model-first.

mhenrixon
yep, so basically the same thing I do.looks like there is no other solution, except deleting the model and regenerating it.
Andy
+1  A: 

I would definitely check out the EDM Generator which allows you to do a full generation of the model from scratch - Click here to go to the MSDN reference. It has saved me a lot of time and hope it will do the same for you.

BlueSam