Language Integrated Query

Why Trust Techopedia

What Does Language Integrated Query Mean?

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.

Advertisements

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.

Techopedia Explains Language Integrated Query

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:

  • LINQ to XML: Converts XML documents to a group of XElement objects. These objects are then queried by the local execution engine, which is part of the standard query operator.
  • LINQ to SQL: Allows LINQ to be used to query SQL server databases. Because SQL server data resides in a remote database and uses its own query engine, this provider converts a LINQ query to SQL query first and sends it to the SQL server for processing.
  • LINQ to DataSets: Enables support for any generic database. This provider uses ADO.net, which handles communication with the database.
  • LINQ to Objects: Uses the local query execution engine for in-memory collections. The generated code refrences the standard query operators’ implementation.
Advertisements

Related Terms

Margaret Rouse
Technology Specialist
Margaret Rouse
Technology Specialist

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.