LINQ to SQL: It Lives! (sort of)

A lot of people are confused about whether or not they should use LINQ to SQL, because the word on the street is that Microsoft decided to kill it in favor of another ORM stack, the ADO.NET Entity Framework. The truth, however, is that Microsoft has never said they won’t continue to support LINQ to SQL, only that they won’t be investing heavily in advancing the product and adding a lot spiffy new features. I liken the situation with that of Windows Forms versus Windows Presentation Foundation. Windows Forms aren’t going anywhere and will continue to be supported, but Microsoft is not going to invest a whole lot in advancing Windows Forms when WPF is their primary GUI platform.

That is why Damien Guard, a member of the LINQ to SQL / Entity Framework team, posted a list of changes to LINQ to SQL coming with the release of .NET 4.0.

For a lot of situations, LINQ to SQL makes perfect sense. For one thing, it’s a whole lot faster than EF, because it doesn’t have to go through as many query transformation layers. LINQ to Entities starts with an expression tree, that turns into a conceptual command tree, that turns into a store command tree, that turns into native SQL. L2S, on the other hand, starts with an expression tree that’s converted directly into native SQL.

LINQ to SQL is perfectly suited for real-world scenarios, with great support for stored procedures, concurrency, and POCO. I even have a client that uses it to drive their bread-and-butter web application, and they’ve experienced great results with it. EF, on the other hand, will only really be production-ready when version 2 comes out with .NET 4.0.

That said, if you do want to benefit from the tremendous investment Microsoft is making it its data platform, or if you want to be able to use databases other than SQL Server, then Entity Framework is definitely the way to go. Furthermore, EF is more than just an ORM – things like reporting and analysis services will eventually know how to talk to an EF conceptual model.

However, if you have total control over which backend database you will use, and you know that will always be SQL Server, and you want to take advantage of the power, performance and simplicity LINQ to SQL has to offer, then you should not hesitate to use it. It will be around for quite a while … at least as long as Windows Forms. J

About Tony Sneed

Sr. Software Solutions Architect, Hilti Global Application Software
This entry was posted in Technical. Bookmark the permalink.

2 Responses to LINQ to SQL: It Lives! (sort of)

  1. Pingback: Tony and Zuzana’s World » Who is Improving LINQ to SQL? Plinqo by Code Smith!

  2. Blasar says:

    I have complete applications developed with linq to sql and can say that this tool has everything you need to complete professional development. After reading this article I will analyze in depth the advantages of ADO.NET Entity Framework.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.