101 LINQ Examples written using Batches

[Back to Batches examples]

Schema Classes

Restriction Operators

Projection Operators

Partitioning Operators

Ordering Operators

  • OrderBy - Simple 1
  • OrderBy - Simple 2
  • OrderBy - Simple 3
  • OrderBy - Comparer
  • OrderByDescending - Simple 1
  • OrderByDescending - Simple 2
  • OrderByDescending - Comparer
  • ThenBy - Simple
  • ThenBy - Comparer
  • ThenByDescending - Simple
  • ThenByDescending - Comparer
  • Reverse

Grouping Operators

  • GroupBy - Simple 1
  • GroupBy - Simple 2
  • GroupBy - Simple 3
  • GroupBy - Nested
  • GroupBy - Comparer
  • GroupBy - Comparer, Mapped

Set Operators

  • Distinct - 1
  • Distinct - 2
  • Union - 1
  • Union - 2
  • Intersect - 1
  • Intersect - 2
  • Except - 1
  • Except - 2

Conversion Operators

  • To Array
  • To List
  • To Dictionary
  • OfType

Element Operators

  • First - Simple
  • First - Condition
  • FirstOrDefault - Simple
  • FirstOrDefault - Condition
  • ElementAt

Generation Operators

  • Range
  • Repeat

Quantifiers

  • Any - Simple
  • Any - Grouped
  • All - Simple
  • All - Grouped

Aggregate Operators

  • Count - Simple
  • Count - Conditional
  • Count - Nested
  • Count - Grouped
  • Sum - Simple
  • Sum - Projection
  • Sum - Grouped
  • Min - Simple
  • Min - Projection
  • Min - Grouped
  • Min - Elements
  • Max - Simple
  • Max - Projection
  • Max - Grouped
  • Max - Elements
  • Average - Simple
  • Average - Projection
  • Average - Grouped
  • Aggregate - Simple
  • Aggregate - Seed

Miscellaneous Operators

  • Concat - 1
  • Concat - 2
  • EqualAll - 1
  • EqualAll - 2

Custom Sequence Operators

  • Combine

Query Execution

  • Deferred Execution
  • Immediate Execution
  • Query Reuse

Utility Routines

  • GetProductList code

Join Operators

  • Cross Join
  • Group Join
  • Cross Join with Group Join
  • Left Outer Join
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License