Brendan Vogt
Brendan Vogt

Reputation: 26028

Entity framework 4 updating the model when a table changes

I am using Entity Framework 4.

I have my model file with my tables on it. If I go and add a new column to one of my tables (in SQL Server) how do I update the table in the model without having to go and delete and re-adding it to the model?

Thanks

Upvotes: 2

Views: 3250

Answers (1)

RoelF
RoelF

Reputation: 7573

There is an option when you right click anywhere in the model (*.edmx): Update Model From Database...
Then a wizard will look for any differences (Add / Refresh / Delete). So if you need to update a table, go to the Refresh tab and select your table.

Mind you, this is only possible in an Entity Framework model, not in a LinqToSql model.

Upvotes: 4

Related Questions