具有rowguid的实体框架更新表 [英] Entity Framework update table with rowguid
问题描述
rowguid
,在此更改之前生成的最后一个模型工作非常好,但现在新的表I导入(使用数据库优先)获取 rowguid
并且不可能更新,我删除了 Model.edmx
我收到这个错误。
错误3023:映射从第551行开始的片段中的问题:列中的Location.rowguid位置必须映射:它没有默认值,不可空。
您可以备份数据库在另一台计算机上还原它,而不保留复制设置,将删除包含添加的rowguid列的所有复制跟踪,然后可以从还原的数据库生成实体。
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.
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.
这篇关于具有rowguid的实体框架更新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!