What is the difference between Entity Framework and LINQ to SQL by .NET 4.0? -


I was checking and felt that the EEF had replaced SQL from LINQ. I used to write LINQ to SQL I'm familiar with, but I do not know anything about EF. Anyway, while reading the code, nothing seems to have changed except the name. The same old workshop, the same old work

I did a little research. I know that LINQ is not limited to SQL except EF is not limited to Microsoft-Family SQL Server people are not happy with EF That it is more and more But now I am reading the same code under the name EF. Classes only ADO Are generated from the net entity models which are insted instantly of SQL from LINQ. Can the EF clean the nuisance about the feature because it is now real actual standalone?

These are somewhat similar, and can be used very similarly in code-wise But they have some important differences, note that "LINQ" is not equal to "LINQ to SQL"; EF also uses LINQ to have some notable differences:

  • LINQ is largely SQL Server from SQL, not much from design as per implementation. Designed to support EF, and supports many dbies, if you have a compatible ado Is the net provider.
  • From the box, there is a very bad story for DB metadata changes from LINQ to SQL in SQL. You have to rebuild some parts of your model from scratch, and you lose optimization.
  • EF model features such as many-to-many relationships and legacy support, SQL does not directly support it from LINQ.
  • In .NET 3.5, LINQ to SQL had better support for SQL-server-specific functionality than EF. This is not true in most .net 4; They are quite similar in that respect.
  • EF lets you select Model First, DB First or Code First Modeling. SQL from LINQ, outside of the box, actually supports only DB first.

Comments