[英]The ObjectContext might be in an inconsistent state
I have an Error creatting relations whith EntityFramework 4.0 我在使用EntityFramework 4.0建立关系时遇到错误
The changes to the database were committed successfully, but an error occurred while updating the object context. 已成功提交对数据库的更改,但是在更新对象上下文时发生错误。 The ObjectContext might be in an inconsistent state.
ObjectContext可能处于不一致状态。 Inner exception message: Metadata information for the relationship 'CodeFirstNamespace.EventsIndex_Module' could not be retrieved.
内部异常消息:无法获取关系“ CodeFirstNamespace.EventsIndex_Module”的元数据信息。 If mapping attributes are used, make sure that the EdmRelationshipAttribute for the relationship has been defined in the assembly.
如果使用了映射属性,请确保在程序集中已为该关系定义了EdmRelationshipAttribute。 When using convention-based mapping, metadata information for relationships between detached entities cannot be determined.
使用基于约定的映射时,无法确定有关分离实体之间关系的元数据信息。 Parameter name: relationshipName
参数名称:RelationshipName
您的实体类中可能缺少一个属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.