开发者

EdmRelationshipAttribute error in Entity Framework

I am experiencing the following error when I try to assign a new reference to a navigation property. So far, all of my searching has not really turned up anything useful, so I was wondering if I might get any help from SO on this.

Metadata information for the relationship 'CustomerModel.FK_Execution_ClientBlock' could not be retrieved. Make sure that the EdmRelationshipAttribute for the relationship has been defined in the assembly

What is strange is that all of my code works. This is only occurring during a unit test. I assume it's because I'm using a mockin开发者_Python百科g framework (MOQ) to mock up this particular EF object.

We're using the version of EF that comes with .net 3.5 if that helps.


I have previously had a similar problem, in my case the solution was this: MetadataException when using Entity Framework Entity Connection

Basically you need to add the name of the dll to the metadata connection string

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜