Entity framework - having the same table in more than one edmx

advertisements

I have two edmx files .
Both contain the table "applicationType".
That means I have two objects applicationType with different namespace. When I try to query from one
I get the following error -

 "Schema specified is not valid. Errors: \r\nMultiple types with the name
 'ApplicationType' exist in the EdmItemCollection in different namespaces.
  Convention based mapping requires unique names without regard to namespace
  in the EdmItemCollection.\r\nThe relationship
  'myModel.FK_ApplicationAttribute_ApplicationType' was not loaded because the type
  'myModel.ApplicationType' is not available.\r\n"}
   System.Data.EntityException {System.Data.MetadataException}

can anyone suggest how to query it ?


If the two Models are in the same namespace, you must have different names for these objects. Eg:

Model 1 - namespace: myApp - table: applicationType - entityName: applicationType

In your second model you must use another namespace, or, another entityName.