1

Closed

Fix Entity Framework, designer version to respect full entity names

description

Fix EF such that two .edmx files can co-exist if they happen to share entity names. This would be good for data migration. Right now a nasty error pops up when using the POCO variant.
Closed Mar 15, 2013 at 12:53 AM by moozzyk
Re-closing after updating release.

comments

moozzyk wrote Dec 29, 2012 at 8:29 AM

Is this about having two edmx files with exactly the same sets of entities (including names, namespaces and properties)? Or is it in general a duplicate of http://entityframework.codeplex.com/workitem/589 where namespaces for POCO types are ignored and therefore you get an exception when having two entities with the same names but different namespaces since they both match an entity from the model?

moozzyk wrote Mar 14, 2013 at 6:30 PM

This is a duplicate of work item 483 (http://entityframework.codeplex.com/workitem/483). Runtime currently does not support POCO types with the same names for non-Code First approach. The designer does not show any errors but when you run your app you will get:
Unhandled Exception: System.Data.MetadataException: Schema specified is not valid. Errors:
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'Country'. Previously found CLR type 'ConsoleApplication19.NewFolder1.Country', newly found CLR type 'ConsoleApplication19.NewFolder2.Country'.

moozzyk wrote Mar 14, 2013 at 6:30 PM

Duplicate of work item 483 (http://entityframework.codeplex.com/workitem/483)

** Closed by moozzyk 03/14/2013 11:30AM