Query and transform data with C# LINQ
8 steps · about 3 h 40 min · Intermediate
- See the LINQ workflow (guide, Microsoft Learn, 30 min)
Connect data sources, query operators and strongly typed results in one model.
- Write a first query (guide, Microsoft Learn, 30 min)
Create a small sequence and express selection with query or method syntax.
- Filter records (reference, Microsoft Learn, 20 min)
Keep only elements that satisfy a clear predicate.
- Project a result shape (reference, Microsoft Learn, 25 min)
Transform source objects into the exact fields needed downstream.
- Order results predictably (guide, Microsoft Learn, 25 min)
Apply primary and secondary keys without mutating the source collection.
- Group related values (guide, Microsoft Learn, 30 min)
Partition records by a meaningful key before summarising them.
- Calculate aggregates (reference, Microsoft Learn, 25 min)
Compute counts, totals and averages with explicit empty-sequence behaviour.
- Control when the query runs (guide, Microsoft Learn, 35 min)
Explain deferred execution, materialise deliberately and avoid accidental repeated work.