Module 1 · LINQ Fundamentals · Lesson 2 of 32
How to read this guide
The guide is built in layers.
Part 1 — Foundations
Read Part 1 even if you already know LINQ, because most LINQ bugs trace back to two ideas: deferred execution and the IEnumerable vs IQueryable split.
1.1 What LINQ actually is
1.2 The two syntaxes: query vs method
1.3 They are extension methods — here's how that works
1.4 The two worlds: IEnumerable<T> vs IQueryable<T>
1.5 Deferred vs immediate execution
1.6 Func<T> vs Expression<Func<T>> — delegates vs expression trees
1.7 Expression trees: the basics
Part 2 — Core operators (the ones you actually use)
2.1 Filtering
2.2 Projection
2.3 Ordering
2.4 Partitioning / paging
2.5 Quantifiers
2.6 Element operators
2.7 Aggregation
2.8 Grouping
2.9 Joins
2.10 Set operations
2.11 Materialization & conversion
2.12 Generation
Part 3 — Performance & time complexity
3.1 Complexity cheat sheet (LINQ to Objects, n = input)
3.2 The #1 bug: multiple enumeration
3.3 Deferred execution + captured variables
3.4 Streaming vs buffering — and memory
3.5 Pick the right data structure for lookups
3.6 Cheap counts: TryGetNonEnumeratedCount (.NET 6+)
3.7 IQueryable / EF Core performance essentials
3.8 When not to use LINQ
Part 4 — Medium
4.1 Grouping with composite keys and aggregation
4.2 Joins in depth + composite keys
4.3 The let clause
4.4 Nested / correlated subqueries
4.5 Custom equality with IEqualityComparer<T>
4.6 DefaultIfEmpty, Zip, SequenceEqual
4.7 Composing reusable query fragments
Part 5 — Advanced
5.1 Combining predicates with expression trees (PredicateBuilder)
5.2 Dynamic ordering by property name
5.3 Writing your own LINQ operator
5.4 PLINQ — parallel LINQ
5.5 Async streams and LINQ over IAsyncEnumerable<T>
5.6 EF Core specifics worth knowing
Part 6 — What recent .NET versions added
6.1 .NET 6 — the big batch
6.2 .NET 7 — Order / OrderDescending
6.3 .NET 9 — Index, CountBy, AggregateBy
6.4 .NET 10 — LeftJoin / RightJoin
6.5 .NET 10 — built-in async LINQ (System.Linq.AsyncEnumerable)