无法更新的EntitySet'ItemRankList',因为它有一个DefiningQuery和否下; UpdateFunction>元素存在 [英] Unable to update the EntitySet 'ItemRankList' because it has a DefiningQuery and no <UpdateFunction> element exists

查看:289
本文介绍了无法更新的EntitySet'ItemRankList',因为它有一个DefiningQuery和否下; UpdateFunction>元素存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何想法,为什么在LINQ实体框架提供了以下奇怪的错误:




无法更新EntitySet的'ItemRankList',因为它有一个DefiningQuery并没有元素存在于支持当前操作的元素。



解决方案

猜我还应该问的背景下...你是如何使用LINQ?



你有一个主键表上定义?



如果不添加键和更新EF模型。


Any ideas why does the entity framework in LINQ gives following strange error:

Unable to update the EntitySet 'ItemRankList' because it has a DefiningQuery and no element exists in the element to support the current operation.

解决方案

Guess i should also ask the context... how are you using linq?

Do you have a primary key defined on the table ?

If not add the key and update the EF model.

这篇关于无法更新的EntitySet'ItemRankList',因为它有一个DefiningQuery和否下; UpdateFunction>元素存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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