views:

813

answers:

4

What are the pros/cons of both? Also, I've heard various rumors concerning if Microsoft will continue to support LINQ to SQL, any further info on this would be appreciated.

+2  A: 

This post points to some info. in particular 3 main differences:

  • The ability to query relational stores other than Microsoft SQL Server

  • A full textual query language not limited to LINQ's language support

  • Advanced mapping facilities, such as mapping a single class to multiple tables

nzpcmad
A: 

Can you use NHibernate instead? It's very mature and has huge support from the community.

IainMH
+5  A: 

L2S will continue to be supported from what I understand, from what I recall from the last PDC, all focus is being put on L2E for .NET 4.0.

From my experimenting with the current state of L2E, its 'less than adequate'. Especially in the speed area. I did some simple performance testing, and my L2S queries were sometimes 2-4x faster than L2E, and that is even with precompiling the L2E views.

Mike_G
Do you know of any outside research that supports the speed claim? I am interested in knowing because when I create 2 equivalent queries in LinqToSQL and LinqToEntities, LinqToEntities is much faster. My queries are usually simple ones though.
metanaito
ya(nothing 'scientific'), there are a few articles out there:http://oakleafblog.blogspot.com/2008/08/entity-framework-instantiation-times.htmlhttp://blogs.msdn.com/adonet/archive/2008/03/27/ado-net-entity-framework-performance-comparison.aspx
Mike_G
You have to remember that L2E has been pretty beat up by the programming community, but by this time next year it should all be ironed out.
Mike_G
Thanks. I'm pretty excited about Linq to anything. It has problems, but it's fun. I tried both but am sticking with LinqToSQL for now because it seems LinqToEntities is not quite complete and there will be changes.
metanaito
+5  A: 

LINQ to SQL is for apps which will only use SQL, ever.

Entity Framework is for apps which need to provide a pluggable backend (Oracle, MySQL, SQL, XML, etc) datasource.

My philosophy on rumors is to use what makes sense for the project at hand that you consider stable and worry about "support" when you get official statements from MS (or any other company) positively or negatively to that effect. As of right now both are supported.

Peter Samwel