Paresh Makwana
Paresh Makwana

Reputation: 189

How to delete one column of table's from .edmx file fully c#

I am using Entity Framework version 4.0, I want to delete one column from the .edmx model. Because my development database contains one newly added column and my server database still doesn't have that column right now. So how can I solve this issue while publishing my code to my server?

Upvotes: 0

Views: 6870

Answers (2)

Amira.NET
Amira.NET

Reputation: 11

The Entity data model can not be auto-updated so when making changes on the database you have to update the .edmx by :
Right click on the diagram -> Update model from database -> select 'Add' then 'tables' finally on button 'Finish'.
Tell us if it's resolved.

Upvotes: 0

Luc
Luc

Reputation: 1491

You should always have a version of the published code and the database model that belong to that code. In the model, if you select the column in the table you can right click and choose "delete from model" which remove the column

Upvotes: 6

Related Questions