Monday, April 25, 2011

LINQ at a Glance - Part 1


Basic unit of data in LINQ are sequences and elements.

sequences are enumerable values and elements are items in the sequence.

Local Queries
local sequence -  Queries that operate over local sequences are called local queries or LINQ-to-objects queries.
query operator - Query operator is a method that transforms the sequence.
standard query operators -  Where Select etc.

Data can be queried in following ways using LINQ

Fluent Syntax
Chaining Query Operators
Use Lambda Expressions

Query Expressions/Query Syntax
Query Expression always start with from keyword and ends with select or group keyword.
Range Variables --> The identified immediately following the from keyword syntax is called range variable.
Query expression allows us to introduce new range variables using let into and additional from caluse

No comments:

Post a Comment