Tuesday, May 25, 2010

What is LINQ

LINQ stands for Language-Integrated Query. It encompasses a set of features that let you retrieve information from a data source. As you may know, the retrieval of data constitutes an important part of many programs. For example, a program might obtain information from a customer list, look up product information in a catalog, or access an employee’s record. In many cases, such data is stored in a database that is separate from the application. For example, a product catalog might be stored in a relational database. In the past, interacting with such a database would involve generating queries using Structured Query Language (SQL). Other sources of data, such as XML, required their own approach. Therefore, prior to C# 3.0, support for such queries was not built into C#. LINQ changes this.

LINQ adds to C# the ability to generate queries for any LINQ-compatible data source.
Furthermore, the syntax used for the query is the same, no matter what data source is used.
This means that the syntax used to query data in a relational database is the same as that used to query data stored in an array

No comments:

Post a Comment