I’m just starting with the Microsoft stack doing a web site in ASP.Net MVC and so far using LINQ to SQL. Should I consider LINQ to Entities? Does it have anything special to offer? If so, what?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have been investigating this exact thing myself.
Here are my findings in a nutshell
LINQ to SQL
Advantages
Disadvantages
Cannot update the diagram from the database, you have to delete your class and then drag it back onto the diagram from the DB. This is a real pain if you modified the diagram at all.
Not actively being developed any more (they will develop Entity Framework instead).
Entity Framework
Advantages
Has much more functionality (Table inheritance, etc…)
Can be updated from the database
Has multiple providers (not just SQL)
The model can be queried without using LINQ, you can use Entity SQL
Microsoft seems to be investing heavily on it and proposing it as the main way to access a database: Update on LINQ to SQL and LINQ to Entities Roadmap, Clarifying the message on L2S Futures.
Disadvantages
Conclusion
I personally decided to go down the route of using the Entity Framework. I bought a book and have read the online material and I am very impressed with it. It took a little extra effort to learn, but the benefits really are great.