Entity Framework update table with rowguid

半腔热情 提交于 2020-01-05 12:09:06

问题


I am using MERGE REPLICATION on my server and now all tables have a rowguid, the last models generated before this change is working very good, but now the new table I imported (using database-first) get the rowguid and making impossible to update, I deleted this column in Model.edmx and I got this error.

Error 3023: Problem in mapping fragments starting at line 551: Column Location.rowguid in table Location must be mapped: It has no default value and is not nullable.


回答1:


You can backup your database then restore it on another computer without preserving replication settings which will remove all replication traces inclusing the added rowguid columns, then you can generate your entity from the restored database.



来源:https://stackoverflow.com/questions/17624012/entity-framework-update-table-with-rowguid

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