LINQ – Language Integrated Query – is one of the coolest language features I’ve ever seen. It makes queries into first-class language elements – not just strings that you pass along to a database engine. That has all sorts of benefits … one of the simplest is that it enables IntelliSense on queries. One of the fanciest is that “lamda expressions” – which are used to implement the “where” part of a query – are sometimes compiled into executable IL and sometimes compiled into an “expression tree” (data, not code) … which can then be translated into T-SQL. So even though LINQ is general purpose enough to query ANY data collection (for example, arrays), it can be optimized for important types of collections, such as SQL Server databases.

There are so many features, I can’t do LINQ justice. Check out the home page:  http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx.

I recommend starting with the overview, by gurus Don Box and Anders Hejlsberg: http://msdn2.microsoft.com/en-us/library/aa479865.aspx.

The next thing I’m going to learn about is ADO.NET Entities: http://msdn2.microsoft.com/en-us/library/aa697427(VS.80).aspx.

Amazingly enough, VS Orcas accomplishes this without having to upgrade the CLR! LINQ was implemented at the language level (in both C# and VB.NET) using general language features and improvements as building blocks. Wow.