The mapping of CLR type to EDM type is ambiguous with EF 6 & 5?

后端 未结 14 1578
长发绾君心
长发绾君心 2020-11-27 05:38

Please any one can help me to fix this error?

Schema specified is not valid. Errors:

The mapping of CLR type to EDM type is ambiguous because mult

14条回答
  •  无人及你
    2020-11-27 06:31

    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.

提交回复
热议问题