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 887145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:11:00+00:00 2026-05-15T13:11:00+00:00

I’ve just finished going through the MvcMusicStore tutorial found here . It’s an excellent

  • 0

I’ve just finished going through the MvcMusicStore tutorial found here. It’s an excellent tutorial with working source code. One of my favorite MVC v2 tutorials so far.

That tutorial is my first introduction to using ADO.NET Entity Framework and I must admit that most of it was really quick and straight-forward. However, I am worried about maintainability. How customizable is this framework when the customer requests additional features to their site that require new fields, tables and relationships?

I am very concerned about not being able to efficiently execute customer’s change orders because the Entity models are basically drag-and-drop, computer generated code. My experience with code generators is not good. What if something goes haywire in the guts of the model and I’m unable to put humpty-dumpty back together?

In the long run, I wonder if using hand typed models which human-beings can read and edit is a more efficient course than using Entity Framework.

Has anyone worked enough with entity framework to say that they are comfortable using it in a very fluid development environment?

  • 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-15T13:11:02+00:00Added an answer on May 15, 2026 at 1:11 pm

    I have been using entity framework(V1.0) for about a year in my current project. We have 100s of tables,all added to the edmx.
    Problems we face (though not sure if the new entity framework resolves these issues)

    1. When you are used to VS.net IDE, you
      will be used to doing all drag/drop
      operations from your IDE. The
      problem is, once your edmx hosts
      100s of tables,the IDE really stalls
      and you would have to wait for 3-4
      minutes before it becomes responsive

    2. With so many tables ,any edits you
      do on the edmx take long.

    3. When you are going to use a version
      control, comparing 10000 line XML is
      quite painful. Think about merging 2
      branches each having a 10000 line
      edmx,the tables, new association
      between tables, deleted associations
      and going back and forth comparing
      xmls. You would need a good xml
      comparison tool if you are serious
      about merging 2 big edmx files

    4. For performance reasons we had to
      make the csdl,msl and ssdl as
      embedded resources

    5. Your edmx should have to be in sync
      with your DB all the time,or at
      least, when you try to update the
      edmx, it will try to sync and might
      throw some obscure errors if they
      are out of sync.

    6. Be aware that your
      entities(tables/views) should always
      have a primary key, else you will
      get obscure errors. See my other
      question here

    Things We did/I might consider in the future when using EF

    1. Use multiple edmx by using 1 edmx
      for tables logically grouped/linked
      together. Be aware of the fact that
      if you do this, each edmx should
      live in its own namespace. If you
      try to add 2 related tables(say
      person & address) to 2 edmx in the
      same namespace, you will get a
      compiler error stating that the
      foreign key relationship is already
      defined. (Tip: create a folder and
      create the edmx under this folder.
      If you try to alter the namespace in
      the edmx without having the folder,
      it does not save properly the
      namespace the next time you
      open/edit it)

      fewer tables in edmx => less heavy
      container => good
      

      fewer tables in edmx=> easier to
      merge when merging 2 branches

    2. Be aware of the fact that object
      context is not thread safe

    3. Your repository (or what ever DAO you use) should be responsible for creating and disposing the container it creates. Using DI frameworks, especially in a web app complicated things for us. Web requests are served from the threadpool and the container were not disposed properly after the web request was served as the thread itself was not disposed. The container got reused (when the thread was reused) and created a lot of concurrency issues

    4. Don’t trust your VS IDE. Get a good
      XML editor and know how to edit the
      edmx file (though you don’t need to
      edit the designer). Get your hands dirty

    5. ALWAYS ALWAYS ALWAYS (just cannot emphasize this enough) run a
      SQL profiler (and I mean each and
      every step of your code) when you
      execute your queries. As complex as
      the query might look, you will be
      surprised to find how many times you
      hit the DB Example:(sorry, unable to
      get code to the right format,can
      someone format it ?)

      var myOrders = from t in context.Table where t.CustomerID=123
      

      select t; //above query not yet
      executed

      if(myOrders.Count>0)//DB query to
      find count {
      var firstOrder = myOrders.First()//DB query to get
      first result
      }

      Better approach

      // query materialized, just 1 hit to
      DB as we are using ToList() var
      myOrders = (from t in Context.tables
      where t.customerID=123 select
      t).ToList();

      if(myOrders.Count>0)//no DB hit
      {
      //do something
      var myOrder = myOrders[0];//no DB hit
      }
      
    6. Know when to use tracking and no
      tracking(for read-only) and web apps
      do a lot of reads than writes. Set
      them properly when you initialize
      your container

    7. Did I forget compiled queries ? Look
      here for more goodies

    8. When getting 1000s of rows back from
      your DB, make sure you use IQueryable and detach the
      objectContext
      so that you don’t
      run out of memory

    Update:

    Julie Lerman address the same problem with a similar solution. Her post also points to Ward‘s work on dealing with huge number of tables

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

Sidebar

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.