Solved

Asp.net mvc entity issue

Posted on 2016-11-21
6
18 Views
Last Modified: 2016-11-22
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
  • 4
  • 2
6 Comments
 
LVL 17

Accepted Solution

by:
Pawan Kumar Khowal earned 500 total points
Comment Utility
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
Comment Utility
YEs I have to projects with edmx.

Please see the example:

Untitled.png
0
 
LVL 1

Author Comment

by:Moti Mashiah
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

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

Author Closing Comment

by:Moti Mashiah
Comment Utility
Thank you for leading me to the solution.
0
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
Comment Utility
Welcome !!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now