Moti Mashiah
asked on
Asp.net mvc entity issue
Hi Guys,
I have asp.net mvc application and I added ADO entity from my test database then I changed the connection string to the production database. The database in the production and test environment are identical and everything was working just fine so far.
Today I changed the connection string back to the test environment and all of a sudden I got this error:
"error 0019: Each type name in a schema must be unique. Type name 'RMSmasterHQModel.Cashier' was already "
work around:
I recreate the entity and still the same issue.
Please, help.
I have asp.net mvc application and I added ADO entity from my test database then I changed the connection string to the production database. The database in the production and test environment are identical and everything was working just fine so far.
Today I changed the connection string back to the test environment and all of a sudden I got this error:
"error 0019: Each type name in a schema must be unique. Type name 'RMSmasterHQModel.Cashier'
work around:
I recreate the entity and still the same issue.
Please, help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
the problem I have is with the hq.edmx that actually comes from the same sql server and created in both projects.
so in the main project asp.net mvc I have it created twice I think.
so in the main project asp.net mvc I have it created twice I think.
<add name="RMSmasterDBEntities" connectionString="metadata=res://*/Rmsdb.csdl|res://*/Rmsdb.ssdl|res://*/Rmsdb.msl;provider=System.Data.SqlClient;provider connection string="data source=srv-db-01;initial catalog=RMSmasterDB;persist security info=True;user id=sa;password=*******;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="RMSmasterHQEntities" connectionString="metadata=res://*/Hq.csdl|res://*/Hq.ssdl|res://*/Hq.msl;provider=System.Data.SqlClient;provider connection string="data source=srv-db-01;initial catalog=RMSmasterHQ;user id=sa;password=a******;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="ALThompsonCRMEntities" connectionString="metadata=res://*/ALT.csdl|res://*/ALT.ssdl|res://*/ALT.msl;provider=System.Data.SqlClient;provider connection string="data source=srv-db-01;initial catalog=ALThompsonCRM;user id=sa;password=*******;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="ALThompsonCRM2Entitiessav" connectionString="metadata=res://*/ALTsav.csdl|res://*/ALTsav.ssdl|res://*/ALTsav.msl;provider=System.Data.SqlClient;provider connection string="data source=srv-sav-rms1;initial catalog=ALThompsonCRM2;persist security info=True;user id=sa;password=******;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="RMSmasterDB2Entitiessav" connectionString="metadata=res://*/Rmssav.csdl|res://*/Rmssav.ssdl|res://*/Rmssav.msl;provider=System.Data.SqlClient;provider connection string="data source=srv-sav-rms1;initial catalog=RMSmasterDB2;persist security info=True;user id=sa;password=*******;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
ASKER
Problem had been fixed. I just deleted the hq.edmx from the other project.
ASKER
Thank you for leading me to the solution.
Welcome !!
ASKER
Please see the example: