Difference between Entity Framework and LINQ to SQL

Couple of days back I started to do code review for Web based .Net Application. The technology stack used for that application was ASP.NET 4.0, SQL Server and LINQ to SQL for accessing data. This was my first experience on LINQ to SQL because I never worked before on LINQ to SQL. I generally preferred to use Entity Framework as ORM (Object Relationship Mapper) to access database.
After a complete application overview and code review I came to know the differences between Entity Framework and LINQ to SQL. So, in this article we will focus on differences between Entity Framework and LINQ to SQL.

 

LINQ to SQL allows you to query and DML operations on SQL Server by using LINQ while Entity Framework is a ORM provide by Microsoft allows you to query and DML operations on various RDBMS like SQL Server, Oracle, IBM DB2 and MySQL using LINQ. Now a day, Entity Framework is widely used by .NET based applications to access database. Personally, why I feel the Entity Framework is better choice over LINQ to SQL i.e. DBML hence differentiating the LINQ to SQL and Entity Framework to decide which framework is more suitable for your project.

Hope you enjoyed this article. Please do write your comments and suggestions if any.

Leave a Reply