Language integrated query (LINQ) is a Microsoft .NET framework programming model, which adds query capabilities to the .NET programming languages. These extensions provide shorter and expressive syntax to manipulate data. A number of features have been added to C# and Visual Basic to support LINQ. It envelops powerful querying on objects, XML files, and databases.
LINQ encapsulates heavy generics. Distinguishing features include extension methods, lambda expressions, an object initializer, query syntax, and anonymous types. These are language extensions to enhance syntactic performance to queries.
Extension methods extend existing values without deriving any new type. Lambda expressions create expression trees and delegates, while the object initializer produces object initialization syntax that generates an equivalent code.
A language is free to use its own query syntax, which needs to be translated into LINQ method calls. Anonymous types permit the compiler to compile classes, which contain data member declarations.
LINQ supports a number of LINQ providers, as follows:
Read More »