Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8985875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:25:18+00:00 2026-06-15T21:25:18+00:00

I have a simple Entity data model (using VS2010) that I reverse engineered from

  • 0

I have a simple Entity data model (using VS2010) that I reverse engineered from a simple SQL Server database that contains three unrelated tables.

I try to save data to the database using the following code:

var dbOptions = new ARC_WHENTECHModel.TEMP_LANDED_WHENTECH_OPTION_POSITION();

//first map fields required for standard di processing
dbOptions.OPTION_POSITION_SOURCE_ID = webSvcOption.TDR + "_" + webSvcOption.CNTR + "_" + webSvcOption.CRV;
dbOptions.INSERTED_DT = DateTime.Now;
dbOptions.CURRENT_IND = "Y";

//now map the data we've pulled from the web service call
dbOptions.CA = webSvcOption.CA;
dbOptions.CDTP = webSvcOption.CDTP;
dbOptions.CMD = webSvcOption.CMD;
dbOptions.CNTR = webSvcOption.CNTR;
dbOptions.CPP = webSvcOption.CPP;
dbOptions.PDTP = webSvcOption.PDTP;
dbOptions.SPR = webSvcOption.SPR;
dbOptions.TDR = webSvcOption.TDR;


context.AddToTEMP_LANDED_WHENTECH_OPTION_POSITION(dbOptions);
context.SaveChanges();

but I get the following exception:

An EdmType cannot be mapped to CLR classes multiple times. The EdmType 'RDLMServiceTier.TEMP_LANDED_WHENTECH_FUTURES_POSITION' is mapped more than once.

at the following line (base.AddObject) within the designer.cs code:

[global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
public void AddToTEMP_LANDED_WHENTECH_OPTION_POSITION(TEMP_LANDED_WHENTECH_OPTION_POSITION tEMP_LANDED_WHENTECH_OPTION_POSITION)
{
    base.AddObject("TEMP_LANDED_WHENTECH_OPTION_POSITION", tEMP_LANDED_WHENTECH_OPTION_POSITION);
}

Could anyone please advise what I may be doing wrong? I don’t have much experience with Entity Framework (it’s always “just worked” in the past). I guess the next step may be to reflect the EF code but that’s going to be quite tricky because I’m debugging on a remote machine that I don’t have great scope for installing extra software.

Thanks

Rob.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:25:19+00:00Added an answer on June 15, 2026 at 9:25 pm

    Gert answered this correctly – there was another copy of the model file present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the new ADO.NET Entity Data Model on a simple database. I
I'm using core data and I have a simple two-entity model. My navigation controller
I have a simple ADO.NET Entity Framework 4.0 model (edmx) which defines database tables
I have a simple XCDataModel that contains one Entity with One Attribute. Essentially, I
I'm inserting a lot of data into SQL Server CE 4.0 using Entity Framework
I have a simple data model and I am using EF4.1 code first (but
I have a data model like this in SQL Server: table Note - varchar
I have implemented a simple entity ejb with a @version annotation. I expect that
I have a number of simple controller classes that use Doctrine's entity manager to
I have a simple db.Model , that has one of the fields db.ListProperty(users.User) For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.