asp.netado.netdata-access-layerdata-access

Which Data Access layer is the recommended today for ASP.net?


I'm currently building a small website where I write down problems that arise and answers to them for others to see. Currently I'm using a DAL much like the one described here. Now I have been looking at other models, and in particular linq based models using Linq2SQL and the ADO.net Entries framework. I realize I'm moving the data access to the code layer in a way since I'm then filtering out for example a toplist with linq queries. The reason I started doing this was because the DAL was not really syncing up with the DB at all times and nullable types became not nullable when I changed something in the DB. Then if I would reimport the tables into the data table my queries would be lost.

My simple question is really, if you want a good DAL for ASP.net today, what would that be? Suggestions, experiences are more than welcome.


Solution

  • I personally preffer LINQ to SQL and ADO.NET Entity Framework. Microsoft guys also use those technologies in their latest projects (take a look at KOBE project for example). Thus, Microsoft recommends those two as well.

    Though.. sometimes I use Data Access Application block from Enterprise Library and manual DAL coding when I need maximum control over it's functionality and implementation.

    Other alternatives are: NHibernate, SubSonic, different ORM solutions like LLBLGen Pro.


    Great books on this subject:


    Related tools: