Is LINQ to SQL Dead or Alive?

2019-01-02 20:06发布

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

标签: linq-to-sql
16条回答
余欢
3楼-- · 2019-01-02 20:26

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.

查看更多
无与为乐者.
4楼-- · 2019-01-02 20:27

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

Post at LINQDev.com

查看更多
旧人旧事旧时光
5楼-- · 2019-01-02 20:28

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).

查看更多
浮光初槿花落
6楼-- · 2019-01-02 20:29

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.

查看更多
闭嘴吧你
7楼-- · 2019-01-02 20:30

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.

查看更多
登录 后发表回答