We just turned 3! 40% off everything with code 3YEARS (excludes workshops and business offerings) Claim offer → Online Workshop Vibe Coding for Production - April 29-30 Register now →
  • Courses
  • Blogs
  • Leaderboard
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • Hands-On: LINQ in C#

    Master LINQ, one of C#'s most powerful features

    About This Course

    LINQ is one of those C# features you use every day, but writing it well and actually understanding what's happening under the hood is a different story. This course is a hands-on tour through every corner of LINQ in C#, built around coding exercises you solve right in your browser using method syntax. You'll start with the pipeline mental model and the operators you reach for constantly, like Where, Select, OrderBy, GroupBy, and Join, before moving into the parts most developers never touch. Expect deep dives into deferred execution, set operations, aggregations, and the subtle rules that separate a fast pipeline from a slow one. You'll also build your own LINQ operators from scratch, and the course closes with PLINQ for parallel workloads and Async LINQ with IAsyncEnumerable, so by the end, you're equally comfortable shaping data in-memory, across threads, or over async streams.

    Course Curriculum

    9h 50m 15 sections
    What is LINQ and the Pipeline Mental Model
    05:00
    IEnumerable — The Core Abstraction
    05:00
    Extension Methods — How LINQ is Built
    05:00
    Deferred vs Immediate Execution
    05:00
    Query Syntax vs Method Syntax
    05:00
    Chaining Operators
    05:00
    Working with Anonymous Types in LINQ
    05:00
    Chapter Capstone - LINQ Pipeline Builder
    05:00
    Where — Basic Filtering
    05:00
    Where with Index
    05:00
    Chaining Multiple Where Clauses
    05:00
    OfType — Filtering by Type
    05:00
    Complex Predicate Composition
    05:00
    Filtering with Null Checks
    05:00
    Filtering with String Predicates
    05:00
    Chapter Capstone - Filter Pipeline
    05:00
    Select — Transforming Elements
    05:00
    Select with Index
    05:00
    Projecting to Formatted Strings
    05:00
    Projecting to Named Types
    05:00
    Chaining Select and Where
    05:00
    SelectMany — Flattening Collections
    05:00
    SelectMany with Result Selector
    05:00
    Chapter Capstone - Data Transformation Pipeline
    05:00
    OrderBy and OrderByDescending
    05:00
    ThenBy and ThenByDescending
    05:00
    Reverse
    05:00
    Sorting with Custom IComparer
    05:00
    Sorting Strings with StringComparer
    05:00
    Stable Sorting in LINQ
    05:00
    Chapter Capstone - Multi-Criteria Sorter
    05:00
    Count and LongCount
    05:00
    Sum
    05:00
    Average
    05:00
    Min and Max
    05:00
    MinBy and MaxBy
    05:00
    Aggregate — Custom Fold
    05:00
    Aggregate with Seed Value
    05:00
    Aggregate with Result Selector
    05:00
    Chapter Capstone - Statistical Analyzer
    05:00
    Any
    05:00
    All
    05:00
    Contains
    05:00
    SequenceEqual
    05:00
    First and FirstOrDefault
    05:00
    Last and LastOrDefault
    05:00
    Single and SingleOrDefault
    05:00
    ElementAt and ElementAtOrDefault
    05:00
    Chapter Capstone - Sequence Inspector
    05:00
    GroupBy — Basics
    05:00
    GroupBy with Element Selector
    05:00
    GroupBy with Result Selector
    05:00
    Nested GroupBy
    05:00
    ToLookup — Immediate Grouping
    05:00
    GroupBy vs ToLookup
    05:00
    Chapter Capstone - Data Grouper
    05:00
    Join — Inner Join
    05:00
    Join with Composite Keys
    05:00
    GroupJoin — Left Outer Join
    05:00
    Simulating Cross Joins with SelectMany
    05:00
    Zip — Pairing Two Sequences
    05:00
    Zip with Three Sequences
    05:00
    Chapter Capstone - Data Joiner
    05:00
    Distinct
    05:00
    DistinctBy
    05:00
    Union and UnionBy
    05:00
    Intersect and IntersectBy
    05:00
    Except and ExceptBy
    05:00
    Custom Equality with IEqualityComparer
    05:00
    Chapter Capstone - Set Operations Toolkit
    05:00
    Take and TakeLast
    05:00
    TakeWhile
    05:00
    Skip and SkipLast
    05:00
    SkipWhile
    05:00
    Chunk
    05:00
    Concat — Combining Sequences
    05:00
    Append and Prepend
    05:00
    Enumerable.Range, Repeat, and Empty
    05:00
    Chapter Capstone - Sequence Slicer
    05:00
    ToList
    05:00
    ToArray
    05:00
    ToDictionary
    05:00
    ToHashSet
    05:00
    Cast and OfType
    05:00
    AsEnumerable and AsQueryable
    05:00
    Multiple Enumeration — The Hidden Bug
    05:00
    Chapter Capstone - Conversion Toolkit
    05:00
    Implementing Where with yield return
    05:00
    Implementing Select
    05:00
    Implementing SelectMany
    05:00
    Implementing OrderBy
    05:00
    Implementing Aggregate
    05:00
    Implementing GroupBy
    05:00
    Writing Your Own Extension Method Operator
    05:00
    Chapter Capstone - Mini LINQ Library
    05:00
    AsParallel — Introduction
    05:00
    AsOrdered — Preserving Order
    05:00
    WithDegreeOfParallelism
    05:00
    WithCancellation
    05:00
    Parallel Aggregation
    05:00
    Exception Handling in PLINQ
    05:00
    When NOT to Use PLINQ
    05:00
    Chapter Capstone - Parallel Data Processor
    05:00
    IAsyncEnumerable — The Async Sequence
    05:00
    await foreach
    05:00
    yield return in Async Iterator Methods
    05:00
    Filtering and Projecting Async Sequences
    05:00
    Cancellation in Async LINQ
    05:00
    Async LINQ vs PLINQ — When to Use Which
    05:00
    Chapter Capstone - Async Data Stream
    05:00
    Multiple Enumeration Pitfall — Deep Dive
    05:00
    The N+1 Lookup Pattern
    05:00
    Chaining vs Materializing — Performance Decisions
    05:00
    Complex Multi-Step Transformations
    05:00
    LINQ and Exception Handling
    05:00
    Performance — LINQ vs Manual Loops
    05:00
    Real-World Data Processing Pipeline
    05:00
    Chapter Capstone - Production-Grade Data Pipeline
    05:00

    Meet Your Instructor

    Nick Chapsas

    Nick Chapsas

    Nick Chapsas is a .NET & C# content creator, educator and a Microsoft MVP for Developer Technologies with years of experience in Software Engineering and Engineering Management.

    He has worked for some of the biggest companies in the world, building systems that served millions of users and tens of thousands of requests per second.

    Nick creates free content on YouTube and is the host of the Keep Coding Podcast.

    View all courses by Nick Chapsas

    What's New

    AI Code Challenge Generator
    feature

    AI Code Challenge Generator

    Generate unlimited coding challenges with AI. Practice C#, Python, TypeScript, and JavaScript in your browser with instant test feedback.

    Learn more about AI Code Challenge Generator
    Getting Started: Model Context Protocol (MCP)
    course

    Getting Started: Model Context Protocol (MCP)

    Learn how to get started with the Model Context Protocol (MCP) and integrate it into your applications.

    Learn more about Getting Started: Model Context Protocol (MCP)
    Hands-On: Learn TypeScript
    course

    Hands-On: Learn TypeScript

    Learn TypeScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn TypeScript
    Hands-On: Learn JavaScript
    course

    Hands-On: Learn JavaScript

    Learn JavaScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn JavaScript
    Hands-On: Data Structures & Algorithms in C#
    course

    Hands-On: Data Structures & Algorithms in C#

    Master data structures and algorithms through hands-on coding exercises in C#. Free to enroll for 7 days!

    Learn more about Hands-On: Data Structures & Algorithms in C#
    Blogsmith.ai
    feature

    Blogsmith.ai

    Turn your videos into blogs and newsletters with AI. Check out our new product at blogsmith.ai.

    Learn more about Blogsmith.ai
    Leaderboard
    feature

    Leaderboard

    See how you stack up against other learners. Track your progress, climb the ranks, and compete with the Dometrain community.

    Learn more about Leaderboard
    Hands-On: Learn PostgreSQL
    course

    Hands-On: Learn PostgreSQL

    Learn PostgreSQL through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn PostgreSQL
    Free Hands-On: C# for Beginners
    course

    Free Hands-On: C# for Beginners

    Learn C# through hands-on coding exercises. Practice what you learn with interactive challenges designed for everyone, from beginners to experts.

    Learn more about Free Hands-On: C# for Beginners
    Getting Started: AI for .NET Developers
    course

    Getting Started: AI for .NET Developers

    Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

    Learn more about Getting Started: AI for .NET Developers
    Getting Started: Building .NET Applications on AWS
    course

    Getting Started: Building .NET Applications on AWS

    Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

    Learn more about Getting Started: Building .NET Applications on AWS
    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn more about What's new in C# 14
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn more about From Zero to Hero: SignalR in .NET
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn more about Deep Dive: Solution Architecture
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn more about Getting Started: Caching in .NET
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn more about From Zero to Hero: Testing with xUnit in C#
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn more about Create a ChatGPT Console AI Chatbot in C#