Reputation: 19232
So I am using a model first EF pattern, not code first. I have my "POCOs" in separate assemblies and I getting the error:
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'request_saga'. Previously found CLR type 'MyDal1.request_saga', newly found CLR type 'MyDal2.request_saga'. this is in project.foo
So this popular SO question and answers does not solve my problem as my POCOs are in separate assemblies: The mapping of CLR type to EDM type is ambiguous with EF 6 & 5?
That is one of the two recommended solutions for this problem as can be found here:
Giving my POCOs different names is not an option. Am I missing something? It seems very clear that having the POCOs with the same name in separate projects is a very viable solution but it is not working for me.
I should also note that other developers are not have this problem on their machines, just me on my machine.
Upvotes: 0
Views: 4865
Reputation: 359
I had a problem like this once that had me baffled for a while. I used data first and copied the wrong connection string. it forced EF to resolve using the wrong model. I basically started over with the connection string, and presto.
Make sure your data first connection string lists the model properties correctly.
Upvotes: 1