LINQ to SQL and ADO.NET Entity Framework are extensions of ADO.NET and are introduced to avoid difficulties involved in writing programs using object oriented programming languages to access data residing in RDBMS. Both have provided mechanisms to de-couple pure business logic and underlying data access logic (which is provided within the framework) with the help of LINQ (Language-Integrated Query) and thus allowing to query data using programming language’s own syntax. Thus both allow representing data in the relational database as business objects and also represent relations within the objects (including inheritance).

While speaking about similarities or differences, we understand that ADO.NET Entity Framework’s LINQ to Entities can be considered as superset of LINQ to SQL and that, ADO.NET Entity Framework is much more than LINQ to Entities.

LINQ to SQL can be used for rapid application development while ADO.NET Entity Framework can be used for enterprise application development.

LINQ to SQL can only support MS SQL Server database (also its compact version) however, external vendors are developing data providers for MySQL, Oracle, Postgres, etc. ADO.NET Entity Framework is built on top of ADO.NET data provider model and thus supports all existing ADO.NET data providers.

LINQ to SQL allows developers to generate .NET classes that directly map respective database tables or views. This leads to 1:1 mapping between class and table. This means that it looses the flexibility of an object representing a part of table or one object representing data from multiple tables. On the other hand, ADO.NET Entity Framework allows developers to generate .NET classes that map to conceptual data model. This leads to m:n mapping between classes and tables and thus has the flexibility of an object representing a part of table or one object representing data from multiple tables. Due to this flexibility, DBA can make changes to the database for improving performance, partitioning, etc. without affecting business logic.

Thus LINQ to SQL is targeted for developing rapid applications which can support MS SQL database and have simple mapping of business objects to relational data while ADO.NET Entity Framework is targeted for developing Enterprise applications which can support MS SQL databases as well as other databases through extended ADO.NET data provider and also have complex mapping of business objects to the persistent data.

Popularity: 16%

Leave a Reply:

3 Responses to “LINQ to SQL vs ADO.NET Entity Framework”

commenter

An excellent and quite clear description of differences between LINQ to SQL and ADO.NET Entity Framework. Thanks for sharing your knowledge

commenter

Perfect post to know the differences between LINQ to SQL & EF

commenter

Simply superb.It is easy to understand.
I want to move my project from Linq to Sql to ADO.Net Entity frame work, How can i do this?

Leave a Reply:

Name (required):
Email Address (required, not published) :
Website :
Comment (required):

Contact Us :

Dot Com Infoway, a CMMI Level 3 multinational information technology company, is a pioneer in delivering software development, mobile application and Internet marketing solutions and technologies to businesses. With offices in India, the United States and Netherlands, DCI is positioned to become a leader in delivering advanced IT services for your business.

For more information, email ask@dotcominfoway.com or visit our Contact Page.

Follow Us :

Dot Com Infoway

Tailored to meet international standards and client expectations, our methodology ensures proper risk management, seamless work flow and deadline-oriented development. It has built-in processes to monitor stringent adherence to quality, consistency in performance and accomplishment of project milestones. Our well-defined and flexible business model is a result of our deep industry intelligence and vast experience. Adhering to industry standards, our business model facilitates enterprises to get the best-of-breed solutions at affordable prices and top-notch quality.

Our privacy policy explains how we use and protect any information that you provide when you use our website. With high standards of security, we ensure that your valuable data is protected from misuse, loss or any external amendment.

Cookies for comments