Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC and ORM Selection

We are getting ready to begin redevelopment of a large aging internal enterprise application. We have decided to use ASP.NET MVC, but under consideration is which Object Relational Mapping (ORM) to choose. There are of course a multitude of open source and paid ORM implementations available. However, NHibernate seems to hold the largest mindshare, while the Entity Framework is the new hotness from Microsoft.

While we are doing research and toying around with both we wanted to put it to the community as to which ORM (NHibernate, Entity Framework, or otherwise) they prefer and why.

Somewhat similar Stackoverflow Questions

  • What are you favorite .NET ORMs? (good list, but w/o justifications)
  • ASP.NET MVC + ORM (focuses primarily on Castle Project AR)
  • What object mapper solution would you recommend for .NET? [closed question]

Additional .NET ORM Reading

  • ORM in .NET 3.5
  • Why use the Entity Framework?
  • Why use the Entity Framework? Yeah, why exactly?
  • Best .NET ORM Tool
like image 451
ahsteele Avatar asked Jun 16 '09 22:06

ahsteele


2 Answers

You should have a look at Sharp Architecture an ASP.NET MVC application framework which uses NHibernate.

I've used a few O/RMs in the past couple of years and there's no way would chose anything other than NHibernate.

  1. It's the most mature.
  2. It's got a huge set of features.
  3. It's got a good community behind it.
  4. It's got some fantastic ancillary projects such as Fluent NHibernate.

I don't know what more information people will be able to give you over and above in the questions that you have linked to.

like image 145
Iain Holder Avatar answered Nov 10 '22 12:11

Iain Holder


Crazy talk answer: none.

This is not to say ORMs are not awesome pieces of technology when used right. But in 2011, they are quickly becoming the universal hammer where not all problems are nails. And there is so much going on in the modern ORMs that, especially for people not well versed in them, they can confuse things more than help things. Or, sometimes things are simple enough that straight SQL is a better alternative. No matter how good the ORM is, the abstraction will leak at some point.

The other side of things to look at is the whole NoSQL movement. The technology is still a bit new, but for new work it is a data access strategy one must consider as it takes so much cruft out of building your application.

like image 31
Wyatt Barnett Avatar answered Nov 10 '22 13:11

Wyatt Barnett