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?
Here is an article describing the differences between the two:
http://dotnetaddict.dotnetdevelopersjournal.com/adoef_vs_linqsql.htm
here is a little comparison of the two, there are pros and cons to both.
http://dotnetaddict.dotnetdevelopersjournal.com/adoef_vs_linqsql.htm
First, Linq to entity offer many to many functionnality
Second, Microsoft would put more time into it
and I'm sure many other good reason
I have been investigating this exact thing myself.
Here's my finding in a nutshell
LINQ to SQL
Advantages
- Incredibly easy to use
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
- Complicated and a lot less intuitive
More comparison con be found on: LINQ to Entities vs. LINQ to SQL - What should I use and when?
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 :-)
Although LINQ to SQL isn't going to go away, Microsoft is betting on LINQ to Entities. For that reason, I would go with LINQ to Entities.
The ADO.NET Team Blog has more information on the issue:
http://blogs.msdn.com/adonet/archive/2008/10/31/clarifying-the-message-on-l2s-futures.aspx
I've listed these posts chronologically, but be sure to read at least the last one - it's actually the most important one.