views:

42

answers:

1

I am going to make a smaller website in MVC.NET, mostly to learn how to work with the MVC.NET framework. I can't decide if I should use NHibernate or Linq2Sql as my Data Access Layer. Linq2Sql would much easier and faster to setup, but it doesn't have the capabilities as NHibernate (2 layer caching etc.).

So would it be wiser to use more time to set up the DAL using NHibernate, or could Linq2Sql probably suffice?

A: 

If it is a site you are developing for learning purposes of ASP.NET MVC, you could provide implementations with both frameworks. This way you learn both and also verify that you can easily swap the data access layer with a different one without affecting other parts of the site. Also with FluentNHibernate saying that it will take you more time with NHibernate to setup your DAL layer than with Linq2Sql is simply wrong. Maybe you will have better integration with the IDE.

Also notice that Linq2Sql is deprecated in favor of Linq to Entities.

Darin Dimitrov