views:

558

answers:

4

According to this question, the most popular ORM tool for .Net is NHibernate. However, zero explanations are given. What are the compelling advantages of NHibernate over the other frameworks?

+3  A: 

The NHibernate website makes a pretty good case for itself:

NHibernate supports transparent persistence, your object classes don't have to follow a restrictive programming model. Persistent classes do not need to implement any interface or inherit from a special base class. This makes it possible to design the business logic using plain .NET (CLR) objects and object-oriented idiom.

For an unbiased comparison of many of the major O/RMs out there for .NET, I would recommend that you visit ORM BATTLE .NET

Andrew Hare
ORM Battle is operated by ORM vendor DataObjects.net: it's not generally considered "unbiased." At least one major vendor (LLBLGen Pro) has declined to be represented there for exactly this reason, and several others have questioned the validity of the benchmarks. (Disclosure: I work for an ORM vendor.) See http://ayende.com/blog/archive/2009/08/15/benchmarks-are-useless-yes-again.aspx for (rather ill-tempered, I'm afraid) discussion.
itowlson
-1 that's a highly *biased* comparison website.
Mauricio Scheffer
@itowlson - Thank you for pointing that out - I wasn't aware of that :)
Andrew Hare
I recommend starting from FAQ there: http://ormbattle.net/index.php/faqs.html
Alex Yakunin
Alex Yakunin
Btw, almost immediate attempt of NH project lead (Fabio Maula) to "recover" NH results on its own test failed as well: http://ormbattle.net/index.php/blog/105-a-honest-comparison-of-entity-framework-and-nhibernate.html , and this test was truly based on hack.
Alex Yakunin
Relatively to topic: I'd recommend you to fix the description. ORMBattle compares just LINQ quality and raw ORM parformance on basic operations. Advanced features, etc. aren't compared there - at least currently.
Alex Yakunin
+2  A: 

There is plenty of reading available for you to do:

http://stackoverflow.com/questions/1278094/advantages-and-disadvantages-of-nhibernate

http://stackoverflow.com/questions/658824/what-differentiates-nhibernate-from-other-orms

And a ton more links to people's opinions on the various .NET ORMs:

http://stackoverflow.com/questions/1377236/nhibernate-entity-framework-active-records-or-linq2sql

In a nutshell, NHibernate is feature rich and battle tested. It's free and open source.

Michael Maddox
+2  A: 

For me, the big feature is Fluent NHibernate's Automapping which can take a reasonably complex class model, and create a relational database schema from it.

I'm not aware of any other tool - commercial or open source - that will do this.

Also, extremely powerful and configurable (which can make it arcane, alas).

Tom Bushell
+1  A: 

I highly recommend EntitySpaces. it's the best ORM for me, saves me tons of time and money.

I have long time suspected that site, ormbattle is a scam. And as far as i remember, that Yakunin is one of the owners or operator of ormbattle. so take it with a large grain of salt. check for yourself and don't trust strangers on the net. (except for me, of course).

Ron H