3

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 mocking 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.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Joel Martinez
  • 46,929
  • 26
  • 130
  • 185

1 Answers1

1

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

Community
  • 1
  • 1
Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252