To reduce complexity for developers and help boost their productivity, Microsoft today announced a solution for the .NET Framework called the Language Integrated Query (LINQ) Project, a set of language extensions to the C# and Visual Basic programming languages that extends the Microsoft .NET Framework by providing integrated querying for objects, databases and XML data. Using LINQ, developers will be able to write queries natively in C# or Visual Basic without having to use other languages, such as Structured Query Language (SQL) or XQuery, a query language for accessing XML data. The announcement was made here at the Microsoft Professional Developers 2005 Conference, where Microsoft is making available a Tech Preview containing pre-release versions of the various components of the LINQ Project.
PressPass spoke with Microsoft's Anders Hejlsberg, technical fellow and chief architect of C#, and Paul Vick, technical lead for Visual Basic, to learn more about the LINQ Project.
Ander has been talking about how he wants to bring together the mismatches of XML, SQL, and OO.
Now we are seeing the fruits of trying to merge things together so developers do not need to jump to SQL or XQuery.
LINQ has several components, the first of which is a set of specifications that define how queries are expressed in API form. These specifications are key because they establish the rules for adding language support to any LINQ-enabled language and for adding query support to any LINQ-enabled objects. Then, based on these specifications, Project LINQ includes a set of language extensions to C# and Visual Basic and a set of libraries that provides integrated querying for objects, databases and XML data using native language syntax.
By default, LINQs core query operators can be applied to any .NET array or collection of objects, which effectively provides SQL-like and XQuery-like capabilities for any data that is in memory. LINQ also provides two new critical APIs: DLinq, for accessing relational, SQL-based data, and XLinq, for accessing hierarchical, XML-based data. The query capabilities of Project LINQ are compositional, meaning multiple queries can be easily combined together. Single queries can access data from multiple domains, and you can also specify both local and remote execution.
It will be interesting to hear more this week about this and C# 3.0!
More info at Channel 9 including a video of Anders.