Answer the question
In order to leave comments, you need to log in
What is the difference between LINQ to SQL and Entity Framework and when, which is better to use?
What is the difference between LINQ to SQL and Entity Framework and when, which is better to use?
Answer the question
In order to leave comments, you need to log in
Once I spent a lot of time searching for what is better and how they generally differ.
Look on the Internet, everything is laid out on the shelves.
But in short: Use Entity Framework. LINQ to SQL has been deprecated for a long time and the project is actually closed. EF is developing, albeit at a snail's pace
Entity Framework is an ORM i.e. interaction with the database is carried out through objects.
LINQ TO SQL - a mechanism for retrieving data from a database
It is better not to use LINQ2SQL at all, especially in a team on a large project.
EF - Recommended for widespread use as an ORM with a small footnote - if your project does not have performance requirements for interaction with the database and if you want to quickly build the level of interaction with the database on your knee.
For more efficient interaction with the database, thin wrappers over ADO.NET with calls to stored procedures are recommended.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question