What is LINQ?
One of the key additions in .NET Framework 3.5 is LINQ (Language Integrated Query). In the early days it was a little confusing for many since it is a different model. Here is an attempt to put it in a simple way and see what the capabilities that LINQ provide are.
LINQ adds powerful query capabilities to programming language syntax (C#, Visual basic). It provides some patterns for querying and updating data from different data sources.
What does that mean? With the introduction of LINQ, “query” becomes a basic language construct, just like control structures, classes, methods etc.
As mentioned above, the query can be against different data sources. It can be used with .NET framework objects, SQL Databases, ADO.NET Datasets and XML documents. These different providers define different flavours of LINQ that are listed below:
- LINQ to Objects
- LINQ to XML
- LINQ to SQL
- LINQ to Datasets
Before getting into details of these, we should understand the basic query expressions which I will focus in the next blog in this series.