LINQ: .NET Language-Integrated Query
With .NET Framework 3.5 Microsoft released Language Integrated Query called LINQ. LINQ enables developers to query data sources using a query like syntax with both C# and VB.NET. These data sources can be collections, SQL Server databases, XML, DataSets etc.
The .NET framework 3.5 introduces us to the following query keywords;
from / in - Specifies the data source
where - Conditional boolean expression (e.g. i == 0)
orderby (ascending/descending) - Sorts the results into ascending or descending order
select - Adds the result to the return type
group / by - Groups the results based on a given key
There are more keywords that provide additional functionality
for more details please go through this msdn link LINQ
Comments
Post a Comment