Sql – Which data framework is better for an ASP.NET MVC site – LINQ to SQL or NHibernate

asp.net-mvclinq-to-sqlnhibernate

We're about to embark on some ASP.NET MVC development and have been using our own entity framework for years. However we need to support more than our entity framework is capable of and so I'd like to get some opinions about using MVC with a more robust framework. We have narrowed down or choices to either NHibernate (with the Fluent APIs) or LINQ to SQL.

Which framework lends itself best to MVC style development (I know SO uses LINQ to SQL)?

If we want to support SQL Server, Oracle, MySQL – does that exclude LINQ to SQL?

Best Answer

I've had great success using Fluent NHibernate and dependency injection (Ninject, in my case) with MVC.

It seems to me though that any mature ORM should work well with MVC. Since the nature of MVC (Model/View/Controller) separates the three concerns, any ORM should fit quite nicely into the "Model" role.

Related Topic