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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:15:59+00:00 2026-06-05T15:15:59+00:00

I am trying to decide the pros and cons of the 2 ORM primarily

  • 0

I am trying to decide the pros and cons of the 2 ORM primarily in this area.

  1. Compatibility with Sql Server 2008 R2 & 2012.
    • This is very important as we simply don’t have the resources to debug poor support of existing MS technology stack.
    • Also planning ahead since 2012 is pretty much out and plans to migrate to it are in place.
  2. Support for .NET 4.0 and 4.5 (upcoming)
    • Again very important for pretty much the same reason above.
  3. Transaction handling and table hints eg. forcescan forceseek, read uncomitted.
    • A lot of times the query optimizer does its job well, other times I want the flexibility to tell it what to do.
  4. Support for conversation, self tracking attach & detach
    • This is somewhat fundamental. I hate to keep the session open for prolonged period. Especially in distributed computing/web farm environment.
  5. Ability to handle code first development, create and update schema without destroying data.
    • EF 4.1 seems to be wanting in this regard, although 4.3 is leap and bound better. Also liking the data annotation better than seperate mapping classes in NH. Reason being I want to be able to send in the class and from there be able to create persistence model without widening the method for the mapping classes.
  6. Support for IRepository pattern
  7. Support for LINQ
    • Somewhat tied to (6) above I want really good support for linq. I don’t want developers to muck around with lower level implementation and getting ourselves stuck to one particular ORM
  8. Performance
  9. Support for bulk CRUD operations, without having to load the data into the application layer. Eg. I want to increment all rows in a column of a particular table by 1. I don’t want to load this up to memory, and increment the rows one by one. This would be crazy for such a simple operation. Linq2Sql used to have Magiq to handle this sort of thing, what does NH and EF have?
  10. Caching, eager loading, lazy loading, navigation properties.
    • Let me be frank I hate these things when done implicitly. Reason being it’s hard to distinguish what is cached, stale from what is new. In EF I usually drop all navigation properties, because I don’t want these properties loaded with top 5, because that’s what the current operation needs, but further down the stream another developer attempts to do a count which will be inaccurate.
    • So my personal policy – all SOA shall be stateless unless there is a good reason otherwise. If you need referencing data, get it from persistence. It will be slower but the code will be more readable and flexible.
    • Similarly for caching. It is complex enough as it is in distributed environment, I want all caching to be very very explicit. If a developer wants to code against the cache, it should do so, not code against the ORM, and make it appear as if he is pulling fresh data from persistence when in fact he is getting stale data.
    • Now question is, does NHibernate have any concept/abstraction that would make caching, eager/lazy loading so much more explicit than the one currently available in EF. In this case I don’t care much about ease of development, I care more about clarity and explicitness.

Also I don’t care much for OSS vs. propietary argument. The team cannot afford the time to peek under the hood and start messing around with other people’s code. I care more about the “it just works” angle than anything else.

  • 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-05T15:16:00+00:00Added an answer on June 5, 2026 at 3:16 pm

    You could use bltoolkit 😉 -> http://www.bltoolkit.net/Doc.Linq.ashx

    Just take 2 minutes to read this -> http://www.bltoolkit.net/Doc.LinqModel.ashx

    But in short

    • extremely good Linq support
    • DML operations (nr 9)
    • great performace / bulk support
    • great generated Sql
    • enum support 😉
    • no lazy loading / entity tracking / special magic caching, you now these things that usually cause problems
    • No magic features -> less abstraction -> less leaks -> less troubles -> smaller learning curve

    btw it does nr 3, it has attributes TableFunction & TableExpression to support table-valued UDF, hints, and other around table decorations.
    So you can write your own extension methods to use in your Linq-statements
    for example

    [TableExpression("{0} {1} WITH (TABLOCK)")]
    public Table<T> WithTabLock<T>()
        where T : class 
    {
        return _ctx.GetTable<T>(this, ((MethodInfo)(MethodBase.GetCurrentMethod())).MakeGenericMethod(typeof(T)));
    }
    

    and then

    using (var db = new TestDbManager())
    {
        var q =
            from p in new Model.Functions(db).WithTabLock<Parent>()
            select p;
    
        q.ToList();
    }
    

    Sample DML operation

      db.Employee
        .Where(e => e.Title == "Spectre")
        .Set(e => e.Title, "Commander")
        .Update();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decide how to implement a very basic licensing solution for some
I'm trying to decide which I should use. The pros of pointers to structures
I'm trying to decide between two ways of instantiating an object & handling any
I am a newbie trying to figure out the pros and cons of using
I'm trying to decide how to choose between the WSO2 Gadget Server and WSO2
I am trying to decide if a string is a number in Ruby. This
I have read dozens of posts about PROs and CONs of trying to mock
I trying to decide whether we went to Flex, Silverlight or even ExtJS. There
I'm trying to decide the best way of having radiobuttons switch around the contents
I'm trying to decide whether I should create a simple StackPanel with Buttons on

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.