In this tutorial, I am going to discuss query operators in linq. query operators are categorized as per following criteria.
- Input sequence(s) result in an output sequence.
- Input sequence results in scalar value/single element output.
- No input results in an output sequence (these operators generate their own elements).
Types of LINQ operators
- Restriction: Where
- Projection: Select, SelectMany
- Partitioning: Take, Skip, TakeWhile, SkipWhile
- Ordering: OrderBy, OrderByDescending, ThenBy, ThenByDescending, Reverse
- Grouping: GroupBy
- Set: Concat, Union, Intersect, Except
- Conversion: ToArray, ToList, ToDictionary, ToLookup, OfType, Cast Element: First, FirstOrDefault, Last, LastOrDefault, Single, SingleOrDefault, ElementAt, ElementAtOrDefault, DefaultIfEmpty
- Generation: Empty, Range, Repeat
- Quantifiers: Any, All, Contains, SequenceEqual
- Aggregate: Count, LongCount, Sum, Min, Max, Average, Aggregate
- Joining: Join, GroupJoin, Zip