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

后端 未结 14 1575
长发绾君心
长发绾君心 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:25

    For EF 6.x, I found some notes at https://github.com/aspnet/EntityFramework/issues/941 and fixed this in my solution by adding annotation to the EDM type.

    I edited the EDMX file manually and changed a line like this:

    
    

    to this:

    
    

    or use this if you have existing type elsewhere:

    
    

    where EntityModel is the namespace used for my EF model, and MyApp is the namespace of a business object

提交回复
热议问题