views:

248

answers:

3

Hi,

Can anyone answer my question? We are deciding upon the implementation of our Data Access layer. Initially we were working with NHibernate but now there is a change, so please answer my question...

IS LINQ to SQL a part of the ADO.NET Entity framework or is it a separate library?

If I say I am using "LINQ to SQL" for my data access layer then does it mean I am using the ADO.NET Entity framework for implementing the data access layer.

A: 

In short no , Linq to sql and Ado.net entity framework are 2 different things.

Linq is a language feature. Linq to Sql is an extention which allow you to use linq features with your db. It is like basic DAL generation tool. Ado.net entity framework is and ORM similar to NHibernate.

Sharique
+1  A: 

IS LINQ to SQL a part of the ADO.NET Entity framework or is it a separate library?

No, it's a separate library.

If I say I am using "LINQ to SQL" for my data access layer then does it mean I am using the ADO.NET Entity framework for implementing the data access layer.

No. LinqToSql and Entity Framework are separate and competing products. Microsoft is recommending people use Entity Framework, yet the majority of people are using LinqToSql. Microsoft is pouring the large majority of its development resources into Entity Framework, not LinqToSql. In .NET 3.5, LinqToSql is generally a superior product to Entity Framework, but a direct comparison is difficult.

Michael Maddox
@Michael: -1, because, if a direct comparison is difficult, then why compare?
John Saunders
@John Saunders: The question didn't ask for a comparison, but that seems like the obvious follow-up question. I'm just trying to be helpful. Microsoft has done a pretty horrible job with the marketing message with LinqToSql and EntityFramework. I'd prefer to just point to a clear statement from Microsoft on the position of the two ORMs, but I have yet to find anything. If there is something wrong in my answer, that would be helpful to know.
Michael Maddox
+2 on the messed up marketing message from MSFT... :)
KristoferA - Huagati.com
@Michael: The message is fairly clear, as is the functionality. LINQ to SQL is limited to SQL Server, and to one-to-one mapping to the database. Entity Framework supports other databases, other mappings; in 4.0 supports POCO, etc. LINQ to SQL has a limited future, EF has an unlimited future. BTW, the downvote goes away if you remove the "superior" comment.
John Saunders
@John Saunders: Your clear message doesn't include any of the reality from the EF Vote of No Confidence. LinqToSql has features that EF 3.5 does not. I'm not sure why you failed to mention where LinqToSql is superior to EF 3.5? If you believe EF 3.5 is superior to LinqToSql, you are entitled to that opinion just as I am entitled to my contrary opinion. It's not the first or last time I'll be downvoted because someone disagrees with me.
Michael Maddox
@Michael: if you're going to say, "it's better", then say why it's better. It's possible the OP won't care about any of the issues you raise (as I didn't care about the issues raised in the "vote of no confidence").
John Saunders
+1  A: 

LINQ to SQL and ADO.NET Entity framework are two distinct products, and they implement two separate API's that do not match, meaning you can't just swap one out for the other. Both have their strengths and weaknesses depending on your viewpoints. .NET 4 will also add some improvements to both, more improvements slated to ADO.NET entity framework.

But they are different distinct ORM's, and you will have to choose one over the other...

Brian