tags:

views:

7060

answers:

18

Just when I make friends with LINQ to SQL, it appears as though MS is pulling the rug out from under it.

http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx

From my little bit of research, EF is way overkill for simple work. But after this announcement is there a point in continuing to use LINQ to SQL?

Beyond the future for LINQ to SQL, doesn't this just generally send a bad signal? Given the speed with which MS is throwing bits against the wall, is it rational to use any of the new bits early? (and that's being kind, it's hardly early for LINQ to SQL!).

For my LINQ to SQL work, I think I'm headed to SubSonic!

Update: A couple of new opinions:

http://ayende.com/Blog/archive/2008/10/31/microsoft-kills-linq-to-sql.aspx

http://codebetter.com/blogs/david.hayden/archive/2008/10/31/linq-to-sql-is-dead-read-between-the-lines.aspx

+20  A: 

There's an ambiguity to your question that needs to be resolved.

LINQ != LINQ to SQL

There are a whole bunch of LINQ technologies and providers:

  • Linq to SQL;
  • Linq to Entities;
  • Linq to Objects;
  • Linq to XML;

... and those are just the ones from Microsoft. There are non-MS providers too, including NHibernate.

The blog post you linked talks only about Linq to SQL.

The key advantage to LINQ is that you can learn and use one query syntax and reuse it across multiple technologies.

Given this, I'd suggest that any perceived lack of a future for "Linq To SQL" is irrelevant, as skills you gain in writing LINQ Queries will be transferrable to other tools in the future.

Bevan
LINQ 2 SQL syntax is similar enough to Entity Framework that you can walk between the two pretty easily.
Jason Short
His question is still valid, though, as the actual implementation of LINQ to SQL has some specific advantages working against SQL Server.
Tor Haugen
Don't forget linq2twitter! http://linqtotwitter.codeplex.com/
Rafe Lavelle
Hey, that's cool!
Bevan
+7  A: 

Granted, I think that the choice between LINQ to SQL, LINQ to Entities and LINQ to [insert 3rd Party ORM] here provides a perfectly healthy eco-system of data access layer methodologies that a software developer can choose from. Third party providers like NHibernate, LLBLGen and even Subsonic (not sure if they're going to offer LINQ providers) will definitely make the competition better and more interesting.

That being said, it will be totally sad for Microsoft to abandon LINQ to SQL, especially since it does have a good following -- even StackOverflow is built on it.

Jon Limjap
+1  A: 

I don't know, but I'm trying to contact the PM to find out.

Honestly I think all they need to do is throw us a bone. Just one or two features for the next release that say "We aren't abandoning you."

Jonathan Allen
+46  A: 

1) They can't "kill" Linq-to-SQL as it is already part of the .net framework. What they can do is stop adding features to it. That doesn't prevent the thousands of developers out there that are already using L2S from extending it and improving it. Some core areas are tricky to touch but they're solid already and the missing designer features can easily be bolted on.

2) One of the PDC EF sessions show that they have learnt a couple of lessons from the EFv1 fiasco and they are now copy-and-pasting a lot of the goodies from L2S into EF and pretending it is new EF stuff. In other words, L2S version two has just been "relabelled" EF.

3) LINQ as such (Language Integrated Query) is the best thing since sliced ice-cream and it can be used with a lot of other things than L2S (Linq to objects, Linq to entities, Linq to XML, Linq-to-anything). So the DP group's attempt to force [the vast masses of] L2S adopters over to [the less popular and currently flawed] Entity Framework is no reason to not learn Linq.

Also see this thread (which is what I believe partly triggered Tim's blog post): http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=4061922&SiteID=1

Update 1: The Dec 2008 issue of Visual Studio Magazine cover story by Roger Jennings is a good read on the topic, with some L2S vs EF comparisons: http://visualstudiomagazine.com/features/article.aspx?editorialsid=2583

Update 2: Anders Hejlsberg was quoted in Redmond Developer News as saying "LINQ to SQL is not dead. I can assure you, it is not dead. Nothing ever goes away. We have never done that and we never will."

http://reddevnews.com/blogs/weblog.aspx?blog=3016

KristoferA - Huagati.com
The creators of StackOverflow adopted Linq to SQL as their ORM of choice. Apparently they decided the benefits outweighed the perils.
Robert Harvey
A: 

Thats not what they said. Linq to SQL uses the entity framework. They are saying that they reccommend that you use Linq + Entity and not the standard SqlConnection, SqlDataAdapter, SqlDataReader, etc. classes.

From a usage standpoint, whats is really the difference in using Linq to any of the providers?

StingyJack
You have misunderstood something. L2S does not use the entity framework. They are currently two parallell things that MSFT are trying to merge. In their current versions, L2S is light-weight, fast and composes good SQL translations from Linq expressions. EF/L2E version 1 is the opposite...
KristoferA - Huagati.com
Linq 2 SQL is NOT EF. Entity Framework is total different and is the ONLY way to write a LINQ provider for MS as a third party. LINQ to SQL should have been called LINQ to SQLSERVER. It was built only for that one product.
Jason Short
+2  A: 

It was always a bit weird that with Linq 2 Sql and Entity Framework there was large areas of overlap. I think the only reason L2S only ever made it into the .NET 3.5 release was because there was a large doubt that EF would ever see the light of day. Now that EF1 is out, all be it a very rough v1, there was no need for L2S anymore.

Craig
+3  A: 

Maybe you should not bother learning Linq to SQL, but there's still the Entities Linq that they will keep.

korro
The current EF approach has some serious issues, not least the enforced base-class. I would expect EFvNext to look quite different in places; until then, I would recommend using the simplest option: L2S - or nHibernate ;-p
Marc Gravell
Once you've got your head around LINQ I would suggest that "learning" LINQ to SQL is pretty trivial. It's just a case of adding a LINQ to SQL classes item to your project and drag-dropping a few tables onto the designer.
Richard Ev
@Richard E : Yes, once you've learned something, learning it is pretty trivial.
James M.
+3  A: 

See also http://ayende.com/Blog/archive/2008/10/31/microsoft-kills-linq-to-sql.aspx and the the comments there

loraderon
+6  A: 

Interesting blog post about it. And some related information on Stackoverflow posts.

The basic gist appears to be comments made on the ado.net blog that state the Entity Framework is the only thing getting major developer time for Visual Studio 2010 and Dot Net 4.

My response is - DUH. We have all known this. Microsoft said publicly back at the PDC 2007 that LINQ to SQL was a short term release for SQL Server because there was no other LINQ story to SQL Server. It only works with SQL Server. You cannot write a LINQ to SQL provider - there is no model for it. It was a one off technology, not extensible.

The Entity Framework is the ONLY way from Microsoft to build a LINQ Provider. The Entity Framework has turned out to be quite contreversial, but I think that is partly due to the fact that LINQ to SQL has a better programmer experience today. Entity Framework will catch and surpass LINQ to SQL because it is the ORM/Mapping tool of the future from Microsoft.

EDIT - I just did a slightly more detailed write up about this on my blog

EDIT2 - IQueryable Provider - is NOT the same thing as a LINQ to SQL provider. You can write your own IQueryable Provider for anything you like. You get no designer support or model generation. There is no gui designer model that I know of for tying into LINQ to SQL model generation.

Jason Short
Re.: "You cannot write a LINQ to SQL provider - there is no model for it."Well, there _is_. It is just that they decided to make the necessary members private last-minute to give EF an edge. See http://blogs.msdn.com/mattwar/archive/2007/05/31/the-origin-of-linq-to-sql.aspx
KristoferA - Huagati.com
Sorry, the previous link should have been http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx
KristoferA - Huagati.com
Thanks - had not read that post. I did know that there was an API internally, but didn't know if that had ever been released public knowledge.
Jason Short
The same blog ( http://blogs.msdn.com/mattwar/ ) also has a complete article seriess (with samples) on how to write providers, _and_ a pluggable downloadable L2S provider that you may find useful.
KristoferA - Huagati.com
Doesn't matter if you can hack it - it is NOT officially supported by MS. You have NO VSIP integration for it. You cannot get a logo for you app...
Jason Short
After reading through the blog - he is talking about writing an IQueryable Provider. That is not the same thing as Linq to SQL.
Jason Short
+10  A: 

Not only should you learn Linq (System.Linq.Enumerable and System.Linq.Queryable), you will need to learn the programming language enhancements for your .net language.

In C# 3.0 these include:

  • Extension methods (static methods with the this keyword on first parameter)
  • Compiler inferred types (var)
  • Lambda syntax (which generates an anonymous method or a Expression depending on context)
  • Initializers
  • Property default implementation (a shorthand)

Read more here.


In VB 9.0 there's some inline XML magic, and many other things (many are similar to the above list for C#).

Read more here.

David B
Wow, I must have been having a really literal day. Only with a really strict out-of-context interpretation of the sentence that is the question - does my answer even make sense.
David B
@David B, yea.. I was like, this is an ok answer, I just don't see how it answers this question. lol
Simucal
It keeps getting upvotes. I guess some people just need to see the information in the links... If you liked this answer, you might like my better answer over here: http://stackoverflow.com/questions/471502/what-is-linq/471592#471592
David B
I liked the answer. What was the question?
James M.
+2  A: 

(no, StingyJack, LINQ to SQL does not use the entity framework)

Anyway, I wouldn't worry. Tim states that they are listening to customers regarding LINQ to SQL. Judging from the enthusiasm I've seen for L2S, the customers (that's us) will speak their minds.

And, as KristoferA points out, they can't actually 'kill' L2S, only freeze it. And L2S, once polished, doesn't really require much further development. With the L2S provider in place, any advances in LINQ should be available in L2S as well. So the choice will still be ours.

Tor Haugen
Well, they could kill it by not including it in Dot Net 4 which is supposed to be a side by side install. Which would mean dot net 4 apps would not have access to it without installing 3.5SP1 on the same machine - don't know if that is true or not.
Jason Short
Anyone remember VB6? Microsoft do still support VB6 (kind of). They still say that they are listening to VB6 customers even now. But are we happy? No. The upgrade paths to get our code to the replacement technology, VB.Net, are expensive. So just consider that lesson: and do think about whether LinqToSQL will be in .NET 4, 5, 6... and how much that matters to you.
MarkJ
+2  A: 

Please can I suggest that your opinions are posted on this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=4061922&SiteID=1. That way at least there is a central visible location that can gether a bit of momentum.

+4  A: 

Scott Guthrie told me they would not kill LINQ to SQL:

Post at LINQDev.com

Joe Rattz
+5  A: 

I guess I don't really see the problem here. From the article you've linked:

We are listening to customers regarding LINQ to SQL and will continue to evolve the product based on feedback we receive from the community as well.

Am I missing something? What gives the impression of LINQ to SQL being dead on arrival?

Gabriel Isenberg
+8  A: 

I honestly do not understand where in that article you read that link2sql is dead.

In the blog post you linked to it says:

We are listening to customers regarding LINQ to SQL and will continue to evolve the product based on feedback we receive from the community as well.

For me this reads like LINQ to SQL will be developed and supported in future. I wonder why you think it is dead?

Sam
+3  A: 

Its obvious that 2 ORMs is one to many in Microsoft's toolbox, but to me it seems to be the wrong framework has been chosen for all the wrong reasons. The fact that the C# team did the job that the ADO.NET team was supposed to do in lot shorter time and did the job way better is tough to swallow for the ado.net team. Not that I know the internal workings of the 2 frameworks but I think it would be a lot faster to upgrade the shortcomings linq2sql has to the entity framework.

There seem to be too much politics involved and I think this is really going to hurt the asp.net reputation, since I have no trust in that Entity framework will give us a equally user friendly experience as Linq2sql. The ado.net team could also learn some communication skills from the asp.net mvc team as the clarifications on the problem is at best vague.

It would be fun learning what Scott Gu and his MVC team stands here as most of their examples are using Linq2Sql.

TT
+6  A: 

We are not killing LINQ to SQL. We are optimizing for EF, but LINQ to SQL is definitely not being killed off :)

- Scott / Microsoft.

Scott Barnes
+1  A: 

Anyone remember VB6? Whether you personally loathe it or love it, Microsoft sold millions of copies, and businesses spent millions of dollars writing millions of lines of VB6. What happened next?

  • Well, Microsoft do still support VB6 (kind of - not the IDE).
  • And Microsoft still say that they are listening to VB6 customers even now (in September 09).
  • But are VB6 customers happy? Not since 2002, 4 years after VB6 launched.
  • Why not? The upgrade paths for your code investment to the replacement technology, VB.Net, are expensive.

So just consider that lesson. To me, it seems LinqToSQL support will be rather grudging. They are obliged to support it because it is in the current .NET framework. But will it be in .NET 5, 6, 7...? Just think about how much that matters to you (for all I know, it doesn't matter to you at all).

MarkJ