Wednesday, May 9, 2012

LINQ To SQL Vs ADO.Net Entity Framework


LINQ To SQL Vs ADO.Net Entity Framework

Both LINQ to SQL and the ADO.NET Entity Framework, support the concept of Entity Data Model.  

LINQ to SQL came first and helped developers to get a feel on how the Entity Data Model works, it was a simple framework and helped users to develop rapid applications using the Entity Data Model concept.

ADO.NET Entity Framework, can be viewed as the next version of LINQ to SQL, this is a more advanced framework to implement Entity Data Model, it has more features compared to LINQ to SQL.

The below table summarizes the difference between LINQ to SQL and the ADO.Net Entity Framework.

Sl. No
LINQ to SQL
ADO.Net Entity Framework
1
Supports only SQL Server Database
Supports multiple data sources
2
Development time is less
Development time is more
3
Allows only a direct 1:1 mapping between the Entity classes and the Relational Tables / Views
Flexible to perform mapping as required, partial tables, merging 2 tables, hence allows a m:n mapping between the Entity classes and the relational tables / views
4
Generates a .dbml to maintain the relation
Generates a .edmx files initially. The relation is maintained using 3 different files  .csdl, .msl and .ssdl




Search Flipkart Products:
Flipkart.com

No comments: