C#: Introduction to LINQ, Advantages of LINQ

Updated on     Kisan Patel

Language-Integrated Query (LINQ) is the name for a set of technologies based on the integration of query capabilities directly into the C# language.

LINQ is a technique used to retrieve data from any object that implements the IEnumerable<T> interface. In LINQ, arrays, collections, relational data, and XML are all potential data sources and we can query over it to get only those data that meets our criteria and all is done using C#.

Advantages of LINQ

  • Unifies the way of accessing data from different data sources.
  • Compile-time checking of all queries, reduces run-time errors.
  • Strongly typed.
  • Can be applied in any project layer(UI/Business/Data).
  • Extensive Intellisence/Debugging support.
  • Queries can be dynamically.
  • Tables are automatically created into class.
  • Columns are automatically created into properties.
  • Relationship are automatically appeaded to classes.
  • Lambda expressions are awesome.
  • Data is easy to setup and use.

With LINQ you just need to perform three distinct actions.

  1. Obtain the data source.
  2. Create the query.
  3. Execute the query.

C# LINQ

Leave a Reply