Solved

Asp.net mvc entity issue

Posted on 2016-11-21
6
51 Views
Last Modified: 2017-01-17
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.
0
Comment
Question by:Moti Mashiah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 29

Accepted Solution

by:
Pawan Kumar earned 500 total points
ID: 41896970
Seems like your dll is not getting updated.
go to Bin Folder - DELETE dll and the pdb file for that project and the build again.

After that try again.

Also do you have 2 projects with EDMX ?
0
 
LVL 1

Author Comment

by:Moti Mashiah
ID: 41897828
YEs I have to projects with edmx.

Please see the example:

Untitled.png
0
 
LVL 1

Author Comment

by:Moti Mashiah
ID: 41897864
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.

<add name="RMSmasterDBEntities" connectionString="metadata=res://*/Rmsdb.csdl|res://*/Rmsdb.ssdl|res://*/Rmsdb.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=srv-db-01;initial catalog=RMSmasterDB;persist security info=True;user id=sa;password=*******;MultipleActiveResultSets=True;App=EntityFramework&quot;" 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=&quot;data source=srv-db-01;initial catalog=RMSmasterHQ;user id=sa;password=a******;multipleactiveresultsets=True;application name=EntityFramework&quot;" 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=&quot;data source=srv-db-01;initial catalog=ALThompsonCRM;user id=sa;password=*******;MultipleActiveResultSets=True;App=EntityFramework&quot;" 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=&quot;data source=srv-sav-rms1;initial catalog=ALThompsonCRM2;persist security info=True;user id=sa;password=******;MultipleActiveResultSets=True;App=EntityFramework&quot;" 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=&quot;data source=srv-sav-rms1;initial catalog=RMSmasterDB2;persist security info=True;user id=sa;password=*******;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Moti Mashiah
ID: 41897918
Problem had been fixed. I just deleted the hq.edmx from the other project.
0
 
LVL 1

Author Closing Comment

by:Moti Mashiah
ID: 41897920
Thank you for leading me to the solution.
0
 
LVL 29

Expert Comment

by:Pawan Kumar
ID: 41898341
Welcome !!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question