Home »

Define LINQ ?

Question ListCategory: .NETDefine LINQ ?
milleranthony7 author asked 9 years ago
1 Answers
jessica537 author answered 9 years ago

LINQ is a uniform programming model for any kind of data access. LINQ enables you to query
and manipulate data independently of data sources. Below figure ‘LINQ’ shows how .NET
language stands over LINQ programming model and works in a uniformed manner over any kind
of data source. It’s like a query language which can query any data source and any transform.
LINQ also provides full type safety and compile time checking.

LINQ can serve as a good entity for middle tier. So it will sit in between the UI and data access
layer.

2843

Below is a simple sample of LINQ. We have a collection of data ‘objcountries’ to which LINQ
will is making a query with country name ‘India’. The collection ‘objcountries’ can be any data
source dataset, datareader, XML etc. Below figure ‘LINQ code snippet’ shows how the
‘ObjCountries’ can be any can of data. We then query for the ‘CountryCode’ and loop through
the same.

2843_2

Please login or Register to Submit Answer