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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With