Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Schema specified is not valid. Errors:

The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'CmnAddressCity'.

Previously found CLR type 'ABS.Models.Sales.CmnAddressCity',
newly found CLR type 'ABS.Models.SystemTools.CmnAddressCity'.
Is there any solution?

What I have tried:

i have no idea. i was thinking to type the class reference strongly, but that was bad idea.
Posted
Updated 13-Aug-18 7:01am

You have already received an answer to your post on C# Corner which directs you to this post - c# - The mapping of CLR type to EDM type is ambiguous with EF 6 & 5? - Stack Overflow[^]
 
Share this answer
 
Just add the EntityFramework as "Code First from database" and not as "EF Designer from database". This resolved my problem, but it has a dark side, if you change your database you have to remove all the classes and add it again, or just edit the classes, I use the last when I change properties of the columns, like "Allows null" or the size of a string. But if you add columns I recomend remove and add again the classes.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900