I'm reading this very interesting book on Entity framework (EF) which is an Object Relational Mapper(ORM) offering from Microsoft. Our of curiosity, I started to backtrack all the offerings from Microsoft which is used to connect to SQL Server database. Microsoft uses its proprietary ADO.NET data provider technology to conect to database in all its offerings.
Almost a decade ago, I had used Microsoft application blocks in my project for connecting to SQL Server database. To use it I used to reference the MS Application block DLLs in my project directly. Since then so many other things have also come up. Objective of all of them is same - reduce the repeatitive code developers write to do DB operations. This problem is more prominent every time when you start a new project from scratch.
So I started investigating all the options that will be available to me whenever I start a new project from scratch. How these offerings stack against each other? Are they same or they are a gradual enhancement of the same age old ADO.NET technology with EF being the latest offering? Here are the options I tried to explore:
- Manually using various ADO.NET classes available in
System.Data.SqlClient
namespace (by referringSystem.Data.dll
- Available since .NET Framework 1.x) - Referring
Microsoft.ApplicationBlocks.Data.dll
assembly in your project and executing DB queries. - Enterprise Library from Patterns and practices team of Microsoft.
- LINQ to SQL (Released with .NET v3.5)
- Entity Framework (Released with .NET v3.5 Service Pack 1)
All these options can be a point of confusion once you enter into ADO.NET world. It will be helpful if anyone can throw a birds eye view on these offerings.