Standard Query Operators

Standard Query Operators in LINQ are actually extension methods for the IEnumerable<T> and IQueryable<T> types. They are defined in the System.Linq.Enumerable and System.Linq.Queryable classes. There are over 50 standard query operators available in LINQ that provide different functionalities like filtering, sorting, grouping, aggregation, concatenation, etc.

Classification

Standard Query Operators

Filtering

Where, OfType

Sorting

OrderBy, OrderByDescending, ThenBy, ThenByDescending, Reverse

Grouping

GroupBy, ToLookup

Join

GroupJoin, Join

Projection

Select, SelectMany

Aggregation

Aggregate, Average, Count, LongCount, Max, Min, Sum

Quantifiers

All, Any, Contains

Elements

ElementAt, ElementAtOrDefault, First, FirstOrDefault, Last, LastOrDefault, Single, SingleOrDefault

Set

Distinct, Except, Intersect, Union

Partitioning

Skip, SkipWhile, Take, TakeWhile

Concatenation

Concat

Equality

SequenceEqual

Generation

DefaultEmpty, Empty, Range, Repeat

Conversion

AsEnumerable, AsQueryable, Cast, ToArray, ToDictionary, ToList

Last updated