R – Designing DATA Access Layer in ASP.NET 3.5 app

data-access-layerentity-frameworklinqnetorm

I need to decide about the DATA Access Layer of a medium sized web application to be run on the intranet of a company. I've worked with CodeSmith before and found it useful but it consumes lot of development time if the underlying database schema changes, so would like to do away with it and try my hands with some new DAL which would help in rapid application development.

Please share your opinion about the LINQ technology and also the ADO.Net Entity framework. I've never worked with these technologies and have no idea if they can be sucessfully used for enterprise database centric applications.

Please suggest any other technologies as well which is worth exploring.

-Sweta.

Best Answer

I think you should use Linq (not LinqToSql), because Linq rocks.

I think you should use an ORM, partly because you need something like that to be able to use Linq, and partly because creating a data layer without an ORM is hardly a good way to spend your time and budget.

Entity Framework has not gotten good reviews in general, but many people use it. It is changing significantly in Visual Studio 2010 / .NET 4.0.

NHibernate is what most people use for a .NET ORM. There are a lot of options to choose from.

Here is, I think, a good opinion piece about using stored procedures:

Stored procedures are bad, m'kay?

If you do decide to use an ORM, you probably want to look at this question and the other questions like it:

NHibernate, Entity Framework, active records or linq2sql