What is a language integrated question?
Language Integrated Query (LINQ) provides the ability to integrate the declaration syntax of query into imperative languages, especially C# and VB.NET. The development of LINQ has been solved by developers working in object -oriented environments they encountered in questions. It was introduced as part of Microsoft® .NET Framework version 3.5 in November 2007 and Codename Visual Studio® "Orcas". Writing developers in these languages had to insert SQL or XQuery as strings and manually map the resulting data into .NET objects. The inserted strings and the mapping of queries could not be verified .NET compiler, allowing potential errors to be discovered. The developer would usually betering throughout the collection of resources and create new collections based on search criteria. The developer could also transform data when creating a collection of results. This approach was cumbersome; A simple selection query written in C# or VB would require at least five lines of code while the same query would require one line of code inin question.
Inquiry challenges in an object -oriented environment provided Microsoft Impuls to create a LinQ. LINQ provides a SQL-like syntax to be used in-line with C# or VB, complete with static type control. When asked .NET collections, developers can use LINQ syntax instead of using the nested loops to select items and transform data. Among other advantages, this leads to fewer rows of code compared to purely object -oriented syntax.
When accessing an external ATA, LINQ and support components, they eliminate the need for inquired queries and data mapping in .NET itself. In order to perform data mapping, LINQ depends on the components called LINQ providers. Linq-to-Objects is a shares provider that allows LINQ to access .NET collections. Similarly, there are providers for access to relational databases and XML documents. Most of theseProviders are third -party components that are not included in the .NET framework. Regardless of the provider used, all questions use the same LINQ syntax.
Between the syntax of the language integrated query and the provider is the library of operators added to the .NET frame as part of the LINQ device. These operators perform tasks such as filtering, ordering, setting theoretical operations and aggregation. Because these operators are part of the .NET frame, they can also be used without LINQ if the developer chooses.