Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Language Integrated Query (LINQ) tutorials for beginners

Language Integrated Query (LINQ) is used to querying data from wide variety of data sources like databases, xml, objects etc. It is also pronounced as Link.

Features of LINQ

1) It is a query language that is an integrated feature of the developer’s primary programming languages, such as C# and Visual Basic, without the necessity of learning different databases and query languages.2) LINQ offers uniform way to access and manage data irrespective of data sources. For example, RDBMS, Object Collection, and XML etc.3) It allows query expression to benefit from compile-time syntax checking, static typing and intellisense which were previously available to only crucial code.4) It provides standard query operators which allow traversal, filter, and project operations to be expressed in .Net-based programming languages.

LINQ APIs

System.Linq namesapace provides classes and interfaces that support queries that use LINQ.System.Data.Linq namespace contains classes that support interaction with relational data in SQL Server databases.System.XML.Linq namespace contains the classes for working with XML data.

LINQ Architecture

The .NET applications can be coded using any .NET language. Applications can use LINQ. LINQ providers are going to convert LINQ query into a format that understood by underlying data sources.

LINQ Providers and Description

Below is the LINQ providers and description.

LINQ ProvidersDescription
LINQ to Objects

It is used for querying in-memory collections. This provides the ability to query IEnumerable- based information sources which includes array, collections, list of objects. LINQ to objects is enabled including the System.LINQ namespace.

LINQ to ADO.NET

It includes ‘LINQ to DataSet’ , ‘LINQ to SQL’ and ‘LINQ to Entities’.

LINQ to DataSet

It allows writing queries that take advantage of standard query operator for writing complex queries to query DataSet.

LINQ to SQL

This gives the ability to access relational database (SQL-Server) objects as normal .NET objects. LINQ to SQL integrates SQL schema based definitions to the common language runtime (CLR) type system. This provides strong typing, syntax checking, and intellisense over SQL objects, while retaining expressive power of relational model and performance of query evaluation directly in the underlying database. It performs data access and manipulation using a strongly-typed object-DataContext. Click here to read articles related to LINQ to SQL.

LINQ to Entities

It supports ADO.NET entity framework and allows querying a list of entities abstracted from physical data layer, using LINQ syntax.

LINQ to XML

It provides efficient, east to use, in-memory XML manipulation capabilities to provide XPath/XQuery functionality to programming languages using simple query operators.



This post first appeared on ASPArticles, please read the originial post: here

Share the post

Language Integrated Query (LINQ) tutorials for beginners

×

Subscribe to Asparticles

Get updates delivered right to your inbox!

Thank you for your subscription

×