LINQ to SQL vs. Entity Framework

.net entity-framework linq-to-sql

Question

With the release of VS2008 SP1 and.NET v3.5 SP1, we now have access to the.NET entity framework.

I have something to ask. What are the differences when choosing between LINQ to SQL and Entity Framework as an ORM?

According to my understanding, the Entity Framework is LINQ to SQL's "big brother" when used with LINQ to Entities. What benefits does it have if that is the case? What does it provide that LINQ to SQL alone cannot?

1
823
3/8/2014 12:02:04 AM

Accepted Answer

Microsoft SQL Server's database tables, views, sprocs, and functions are only supported in 1:1 mapping by LINQ to SQL. It's a wonderful API to utilize for rapid data access building to SQL Server databases that are generally well-designed. With C# 3.0 and, LINQ2SQL was first made available. 3.5 Net Framework

An ORM (Object Relational Mapper) API called LINQ to Entities (ADO.Net Entity Framework) enables a comprehensive description of object domain models and their connections to several ADO.Net data sources. In order to create an aggregated mash-up of objects that are built from a range of tables, sources, services, etc., you may combine and match a number of different database suppliers, application servers, or protocols. The.Net Framework 3.5 SP1 included the ADO.Net Framework.

This article on MSDN is a nice introduction: LINQ to Relational Data: An Introduction

480
9/21/2008 3:22:59 AM

Popular Answer

The quickest solution, in my opinion, is that

  • It can be done quickly and simply with LINQ to SQL. This implies that if you are working on anything smaller, you will get started and complete it more quickly.
  • The most aggressive, no-holds-barred approach is to use Entity Framework. This implies that if you are working on something bigger, you will take more time initially, progress slowly, and have more freedom.


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow