I'm trying to rewrite a pretty simple app, from C# to F#, now using the SqlEntityConnection type provider, and I'm running into an EF issue: "the Mapping of CLR type to EDM type is ambiguous," which can occur from opening two SqlEntityConnections that each have a table with the same name.
In this case, however, it's because EF, through the type provider, is apparently mapping a system table. The actual error references the dtproperties table --
{"Schema specified is not valid. Errors: \r\nThe mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'dtproperties'. Previously found CLR type 'SqlEntityConnection2.dtproperties', newly found CLR type 'SqlEntityConnection1.dtproperties'."}
How can I change this table being mapped? Thanks.
(This isn't a problem in the original C# version, which also uses EF.)
It is because you are using POCO and have two types with the same type name. EF ignores namespaces and therefore two types with the same name but different namespaces are ambiguous for EF. ( http://entityframework.codeplex.com/workitem/483 )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With