具有rowguid的实体框架更新表 [英] Entity Framework update table with rowguid

查看:123
本文介绍了具有rowguid的实体框架更新表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的服务器上使用MERGE REPLICATION,现在所有的表都有一个 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆