Update model from database per .edmx doesn't update model/cols if deleted from database?

扶醉桌前 提交于 2019-12-11 11:00:47

问题


When I delete a column from an already existing db from an already existing database model, right clicking on the .edmx "Update model from Database" does not remove deleted columns from the model (column existed in the model and db before but was removed from db) .

One thing that I have noticed is that my mapping detals are not matching up with my .edmx. Mapping detals are up to date with database but they dont' match that of the .edmx.

Is this expected behavior? Thanks!

[Using asp.net 4.0/EF4.1]


回答1:


I have found that, when I update the underlying database table, the best approach is to delete the mapped table from the edmx designer, and then do Update Model from Database.



来源:https://stackoverflow.com/questions/7409083/update-model-from-database-per-edmx-doesnt-update-model-cols-if-deleted-from-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!