Thursday 17 September 2015

Introduction to Linq

Introduction to Linq
LINQ:- 

Language Integrated Query was introduced as new component of .Net framework 3.5.

The basic function of LINQ is to add native data querying capabilities to .Net Framework by using the syntax similar to SQL.

LINQ allows you to define statements that query a data source to generate the requested result set.

LINQ is a programming model that is used to provide a consistent method to obtain and manipulate data.

LINQ is a programming model that is used to provide a consistent method to obtain and manipulate data.

In C#, you can use LINQ directly within query expressions, which are used to query and transform data from a LINQ enabled data source.

Introduction LINQ Queries:-

A query is a expression that retrieves the requested data from a data source. A LINQ query specifies the information that you want to retrieve from a data source.

The three basic steps of a LINQ query execution:-
  1. Obtain the data source that can be either an SQL database or an XML file.
  2. Create the query
  3. Execute the LINQ query.


Why LINQ:- 

  • LINQ has full type checking at compile-time and IntelliSense support in Visual Studio, since it used the .NET framework languages like C# and VB.NET. This powerful feature helps you to avoid run-time errors.
  • LINQ also provides a uniform programming model (i.e. common query syntax) to query various data sources. Hence you don’t need to learn the different ways to query different data sources.


Architecture of LINQ:- 



Namespace of LINQ:- 

using System.Linq;

No comments:

Post a Comment