During the beta of Stack Overflow, I have seen quite a few questions about LINQ SQL but know nothing about it... it sounds very interesting.

What is LINQ and how do I get started?

Links guides or documentation a bonus :)

PS: I am a long time C# developer who daily uses Datatables and Parameterized SQL

+1  A: 

Here you go. I started with ScottGu's explanation/examples and went from there:

+24  A: 

LINQ stands for Language Integrated Query and is a set of extensions for .NET that allow you to query data the same way from code and isn't tied to a specific data source. You can use the same LINQ code for SQL Server, XML, objects, DataSets, and Entities.

Here is a good intro from Scott Guthrie

This is a nice set of 101 LINQ Samples

101 LINQ Sampels is fantastic, I still use it a lot and always refer it for others
+6  A: 
+6  A: 

Here are a couple of good tutorials (video) from OakLeaf Systems:

EDIT: I just ran into this great tool created by the author of C# in a Nutshell: It includes lots of great easy to follow samples.

+9  A: 

Two books you should consider for learning about LINQ, both from Manning:

The former was by far the better written, and taught me almost as much about LINQ in a single chapter than the latter did in a whole book. LINQ is built on a lot of foundation, and C# in Depth builds it up from the ground.

The second book is a whole lot better than nothing, and you will learn things specifically about LINQ that you won't learn in the first. But the first book will give you much better foundation, and puts up at least a token perspective instead of more or less blindly following the MS line. So, I'm recommending C# in Depth first and foremost for learning LINQ.


+4  A: 

Linq is short for "Language integrated query." It's a set of language enhancements built into C# and VB. Basically, what you get is a bunch of standard query operators that can be applied to any IEnumerable of type T. There's a lot of different linq providers for specific types of data- for example, there's linq to xml, linq to entities, even linq to sharepoint.

To get started with linq, in all its many forms, I suggest the book Pro Linq by Joseph C. Rattz. It's an excellent overview of Linq. He takes a ground-up approach, first describing all the language features (like Lambda Expressions and Expression Trees) that Linq is built on, and then moving on to some standard linq provider implementations.

Additionally, here's a pretty good MSDN article describing Linq: LINQ: .NET Language-Integrated Query

Now, Linq to Sql is a linq provider written specifically for SQL Server. Included in this provider is an OR/M, that gives you some handy-dandy functionality (like typing out all your sql tables, so you get a robust design-time view of your database schema.) It's totally awesome, and for me, has greatly speed up development time when working with a sql database. The book I recommended above also has a great section about using Linq To Sql. Also, here's a good "beginner's guide" article from MSDN: Linq To SQL: .NET Language-Integrated Query for Relational Data

+1  A: 

I think this book:

C# in Depth

By Jon Skeet is an excellent programmers' guide that matches your exact needs (moving from earlier C# to C#3.5).

Also if you order it you get the electronic copy too - something more publishers should do (excellent for both Kindles and searching).

+1  A: 

A bit old but still relevant:

Eran Kampf
+6  A: 

I recommend the Hooked On LINQ wiki. They've got some great introductory info, as well as more in depth info and samples on all of the operators.

I listed a lot of LINQ references in the show notes for Herding Code Episode 10 (on LINQ). One of my favorites is an MSDN Magazine article which explains how LINQ works from a framework perspective in a way which really helped me understand how it works.

Jon Galloway
+1  A: 

From MSDN, here are some papers, written by Anders and others:

PS after writing this, I see someone has already linked to these, but buried inside a paragraph, so I'll keep them pulled out here in list form as well.

+3  A: 

To practice without the need to write wrap code just to execute linq-queries you could use

Davide Vosti
+1  A: 

There's a VB.Net version of the 101 Code Samples page too -

+4  A: 

I'd strongly suggest you have a play around with LINQPad (, it's a free tool which allows (umong others things) you to connect to a database server and query it using LINQ to SQL. It takes the pain out of having to set up Console Applications to do the playing.

I cover some of the other stuff on my blog (using LINQPad for non-LINQ code testing) and link off to a really good video on LINQPad:


There is a podcast here (shameless plug) that covers LINQ from one of the authors of LINQ in Action.

Deep Fried Bytes - Episode 14: LINQ’ing the Future of Development with Jim Wooley

Lots of great stuff in that show that may also help you out.

Keith Elder

Here is a step by step tutorial on how to incorporate LINQ with your web applications within Hope this helps

Janani Krish