1
votes

Previously I had only one entity context so the linq query was working well. Now we have splited the database into two sections, so I deleted the tables in the previous context and added another new entity context of the deleted tables, but when I run my application it shows the following error:

The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'SUP_ExSubGroupTable'. Previously found CLR type 'Supporter24Model.SUP_ExSubGroupTable', newly found CLR type 'SUP_ExSubGroupTable'.

Thanks in advance.

3
Which version of EF? DB or Code-First? - Christoph Fink

3 Answers

0
votes

I solved it by myself

by deleting the schema of duplicate tables

in the other context

0
votes

example:: my entitymodel name is employee

in my project i created modelclass name as employee...So this error will occur

Solution is...> just modifying the modelclass name to different name...bcz our enitymodel is same..so we have to modify our project modelclass name to differenet name

0
votes

Your Generated Entity type should be match every where, means you can not change the name of generated entity type.

I have changed the name of entity generated by EF Database first approach, and started getting above error, once I revert back issue is resolved. Because you can change the name but EF keep the reference at multiple place thatsy it give error.