LINQ to SQL vs LINQ to Entities, where should we spend our time?

10/29/2007 9:48:00 AM

Johan Lindfors asked the title question on an internal alias and I thought the responses were pretty good and worth sharing since I have not seen anything posted along these lines anywhere else.  While this shouldn't be construed as "official Microsoft guidance", I would say that the feedback shown below is from some pretty smart folks so probably not too far off the mark.

I thought North Central's very own Mike Benkovich had a great, concise answer to this question...

LINQ to SQL is targeted for Rapid Development – simple generated model that is limited to a 1:1 relationship between conceptual data model and physical objects in the database. Very clean XML representation of model design and code behind file that leverages partial classes to allow the extension of functionality. One limitation is that it because the model generates T-SQL it is limited to use against SQL Server. LINQ to SQL will be part of Orcas release.

LINQ to Entities is based on the ADO.NET Entity framework, which allows for more complex relationships between the conceptual model and the data store. Also it is able to target other dbms beyond SQL Server that have implemented a provider. It supports multiple inheritance models, as well as customization of the conceptual schema.

Chad Hower posted some good follow-up to Mike's reply...

"One limitation is that it because the model generates T-SQL it is limited to use against SQL Server. " But others can, and will make their own LINQ to Oracle, Firebird, MySQL (Yuck!) and so forth.

and

LINQ to SQL is for more direct access - think about it as a type safe way to do what you do with SQL today. Of course it can do quite a bit more - including many of the things datasets can do. LINQ to entities is more "enterprise" targetted and focuses on a greater seperation of the data, as well as dynamic futures in how you change your model and or DB.

and Mike chimed in one last time...

LINQ to SQL is the ORM tool, as opposed to the queryable-ness. There are already LINQ to Amazon, LINQ to Flickr, LINQ to SharePoint, LINQ to (insert here) out there, and this makes the technology pretty compelling. The language extensions of C# 3.0 and VB 9.0 make it easier to enumerate, filter, sort and process sets of data regardless of where they come from. The specific implementation technologies including the SQL, Entities and XML just make it that much easier to create and manage the target set of objects on which to iterate.

Great for reducing impedence mismatches by leveraging some syntactic sugar sprinkled into the expression holes...(I heard that this weekend at a code camp).

............................

Pretty good stuff that is worth having in your back pocket.  Link it up if you think its worth others knowing as well.

Technorati Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Slick Thoughts

Related posts

Comments are closed

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen

About the author

Jeff Brand Jeff Brand

This is the personal web site of Jeff Brand, self-proclaimed .NET Sex Symbol and All-Around Good guy. Content from my presentations, blog, and links to other useful .NET information can all be found here.

E-mail me Send mail


Calendar

<<  August 2008  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Twitter Updates

XBOX
Live

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in