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

  • SEARCH
  • Home
  • 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 764685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:46:05+00:00 2026-05-14T16:46:05+00:00

I know similar questions have been asked before. I am starting with a set

  • 0

I know similar questions have been asked before.

I am starting with a set of xsd-generated data objects (plus the db model is there) and need to persist these almost 1:1 to a single SQL Server database. The number of entities is small (10), and the logic required for the db insert/update/delete (mostly upserts) is thin (albeit there is some).

I am wondering which approach is best?

  1. no ORM with SQL Server stored procs, probably generated using T4
    or something like codeSmith
  2. Entity Fx, generate entities from Db, and manually map the xsd
    entities to EFx entities at runtime
  3. Entity Fx, generate edmx file from DB, then use the POCO approach
    and directly persist the xsd-generated entities (after handcoding
    the ObjectContext derived class I suppose)
  4. code-only EFx approach (looks like one of the most idiotic ideas I have ever seen to me)
  5. anything else?

I am especially keen in terms of maintenance – what happens if a property is added to the XSD-generated entities, how much effort does each approach take.

I would be tempted to go with 1, since the logic is slim and there are no complex mappings (m:n). But it would be possible the Data model will evolve to a more complex domain model, and we don’t want to reimplement anything then.

How bad does each of the EFx approaches hurt in terms of run-time performance?

  • 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-05-14T16:46:05+00:00Added an answer on May 14, 2026 at 4:46 pm

    Your decision in this case should be informed largely by the future direction of your application.

    You should consider Option 3 primarily if you do not want your Entities to have any dependency on the Entity Framework assembly (System.Data.Entity). If you think you might want to distribute or share your Entity/DAL/BL layer as an independent assembly with another application, consider option 3. This will allow you to keep your Entities separated from your persistence implementation. If, however, you don’t expect to have multiple persistence implementations and don’t care about the dependency on the EF assemblies, options 1 or 2 will work just fine.

    On a side note, given the limited persistence logic required, be sure to look into compiled queries in Entity Framework for a big performance improvement.

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

Sidebar

Related Questions

I know similar questions have been asked before, but I've tried many times and
I know that similar questions have been asked before, but I am very much
I know similar questions have been asked before but I haven't seen one where
I know similar questions (regarding cherry-picking) have been asked before, but I haven't really
I know similar questions have been asked before, so don't get snarky and link
I know similar questions have been asked before, but still things are not clear
I know similar questions have been asked before, but I think my solution is
I know similar questions have been asked before, but I can't find one that
I know similar questions have been asked before, but this one is a little
I know that similar questions have been asked before but I have not been

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.