C# LINQ: query and method syntax for collections
9 steps · about 2 h 59 min · Beginner
- LINQ queries in C# (doc, Microsoft Learn, 15 min)
A short official overview that shows both syntaxes side by side and when a query runs, so you start with the big picture.
- Query expression basics (LINQ) (doc, Microsoft Learn, 20 min)
Breaks a query into data source, range variable, from/where/orderby/select, the parts you need before writing your own.
- Write LINQ queries (doc, Microsoft Learn, 20 min)
Puts the same queries in query, method and mixed syntax, so you see how the two styles relate.
- Tutorial: Writing LINQ Queries (tutorial, Microsoft Learn, 30 min)
A hands-on walkthrough that adds filtering, ordering, grouping and let clauses to a student data set.
- Standard query operators overview (doc, Microsoft Learn, 20 min)
Maps each method (Where, GroupBy, Select) to its query keyword and gives you the full operator catalogue to look things up in.
- C# Development for Beginners #18: More LINQ Power - GroupBy, Join, and Performance Secrets (video, Benjamin Day (YouTube), 14 min)
A short video that shows GroupBy, Join, aggregates and ThenBy in action, plus the multiple-enumeration trap.
- C# LINQ Deferred Execution - Understanding Query Evaluation (article, ZetCode, 20 min)
Explains why a query runs only when you enumerate it, which operators stream or buffer, and how to avoid repeated work.
- How to: use LINQ to query or modify collections (doc, Microsoft Learn, 20 min)
Practice with real collection tasks, such as set differences between lists and non-generic collections.
- Language features that support LINQ (doc, Microsoft Learn, 20 min)
Shows the lambdas, var, initializers and extension methods behind LINQ, so the syntax stops feeling like magic.