LINQ (Language Integrated Query) is uniform query syntax in C# used to save and retrieve data from different sources. It is integrated in C#, thereby eliminating the mismatch between programming languages and databases, as well as providing a single querying interface for different types of data sources like an Object Collection, SQL server database, XML, web service etc.
LINQ always works with objects so you can use the same basic coding patterns to query and transform data in XML documents, SQL databases, ADO.NET Datasets , .NET collections, and any other format for which a LINQ provider is available.
LINQ standard query operators can be categorized into the following ones on the basis of their functionality.
- Filtering Operators (Where)
- Join Operators (Join)
- Projection Operations (Select)
- Sorting Operators (OrderBy , OrderByDescending)
- Grouping Operators (GroupBy)
Example:-
No comments:
Post a Comment