Menu Close

Tag: ambiguous

Entity Framework’s quirk: imagined ambiguity

Triple-facepalm

Lots have been said about Entity Framework, in past mostly bad things. Lately I hear more and more voices speaking in advantage of this library. It is being said that it has reached maturity point and is actually usable now. Of course it was usable earlier, but it had its quirks. Unfortunately some are still there. I have recently found one that I couldn’t really believe is true. I had(also severe) problems with EF before, but this one is absolutely no-go for me. If exception message below reads familiar, then most probably you are experiencing it too.

 

Schema specified is not valid. Errors:

The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type ‘<<entity name>>’. Previously found CLR type ‘<<namespace1.entity name>>’, newly found CLR type ‘<<namespace2.entity name>>’.