Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework vs Linq to Entities vs Linq to SQL

I read a lot of articles about how to work with a database in WPF .Net 4 application. As I understood, the main two technologies are:

  • Linq to SQL (L2S)
  • Entity Framework (EF)

but sometimes I also can see mention of Linq to Entities (L2E) technology, but can't find clear explanation what difference between EF and L2E.

So, my question is: Does there is any difference between Entity Framework and Linq to Entities technologies? Or this is synonyms for one technology?

like image 768
Mike Avatar asked Oct 19 '10 12:10

Mike


People also ask

What is the difference between Entity Framework and LINQ to SQL?

LINQ to SQL allow you to query and modify SQL Server database by using LINQ syntax. Entity framework is a great ORM shipped by Microsoft which allow you to query and modify RDBMS like SQL Server, Oracle, DB2 and MySQL etc. by using LINQ syntax. Today, EF is widely used by each and every .

Is Entity Framework and LINQ the same?

Entity Framework is an object-relational mapping (ORM) framework for connecting C# code to external databases, usually SQL Server. LINQ is a query language embedded into C# and a set of extension methods in order to make it useful.

Is LINQ to SQL deprecated?

LINQ to SQL was the first object-relational mapping technology released by Microsoft. It works well in basic scenarios and continues to be supported in Visual Studio, but it's no longer under active development.


1 Answers

There are two ways of writing queries with Entity Framework:

  • Linq to Entities ( http://msdn.microsoft.com/en-us/library/bb386964.aspx )
  • Entity SQL ( http://msdn.microsoft.com/en-us/library/bb387145.aspx )

L2E is not a separate technology, but rather a part of EF.

Have a look at this article for a comparison: http://thedatafarm.com/blog/data-access/choosing-linq-to-entities-vs-entity-sql-vs-entityclient/

like image 97
Yakimych Avatar answered Oct 13 '22 11:10

Yakimych