Skip to content
Search lessons, topics, tests…
Esc

    ↑ ↓ moveEnter openEsc close
    Architecture and Design in .NET: all courses in this track

    Guided course · Architecture and Design in .NET

    Design Patterns in C#: The .NET Interview Guide

    Design patterns for .NET interviews, taught with compilable .NET 8 code and real before/after refactors: SOLID as the foundation; Factory Method, Abstract Factory and .NET 8 keyed services, Builder and Prototype with records, and Singleton as a DI lifetime with captive-dependency checks; Adapter, Facade, Decorator with DI decoration and DelegatingHandler, Proxy with DispatchProxy, and Composite; Strategy, Template Method with BackgroundService, State machines, Command with undo, queues and idempotency, Observer with events and IObservable, Mediator with MediatR pipeline behaviors, Chain of Responsibility as ASP.NET Core middleware, and Visitor with pattern matching and ExpressionVisitor. Every lesson covers the problem, the code, where .NET uses the pattern, trade-offs, pitfalls and interview questions with strong answers. Ends with when not to use patterns, a 10-drill practice set and a 25-question mock interview. 20 lessons.

    Intermediate6 modules · 20 lessons · 6 h 7 min · 5 practice tests · 2 free

    Module 1 · Foundations: Patterns, SOLID and Judgment

    2 lessons · 34 min
    1. 01Design Patterns in .NET Interviews: What They Are, the Patterns You Already Use, and How to Choose OneFree16 min
    2. 02SOLID in Modern C#: The Five Principles as the Foundation for Every Pattern, With a Real RefactorFree, 1 practice test18 min

    Module 2 · Creational Patterns

    3 lessons · 53 min
    1. 03Factory Method and Abstract Factory in C#: From switch Statements to Keyed Services in .NET 8 (included with Full Access)18 min
    2. 04Builder and Prototype in C#: Fluent Builders, required and init, Records and the Shallow-Copy Trap (included with Full Access)17 min
    3. 05Singleton in Modern .NET: Lazy<T>, DI Lifetimes, Captive Dependencies and Thread Safety (included with Full Access), 1 practice test18 min

    Module 3 · Structural Patterns

    4 lessons · 1 h 7 min
    1. 06Adapter and Facade in C#: Wrapping Vendor SDKs, Callback APIs and Subsystems Behind Interfaces You Own (included with Full Access)17 min
    2. 07Decorator in C# and .NET DI: Caching, Logging and Retry Without Touching the Class, Plus DelegatingHandler (included with Full Access)18 min
    3. 08Proxy in C#: Protection, Virtual and Dynamic Proxies with DispatchProxy, and Where .NET Generates Them for You (included with Full Access)16 min
    4. 09Composite in C#: Trees of Parts and Wholes, Product Bundles, Rule Trees, and Where .NET Uses It (included with Full Access), 1 practice test16 min

    Module 4 · Behavioral Patterns: Algorithms, State and Requests

    4 lessons · 1 h 8 min
    1. 10Strategy in C#: Replacing switch Statements with Interchangeable Algorithms, DI Registries and Delegates (included with Full Access)17 min
    2. 11Template Method in C#: Fixed Algorithms With Overridable Steps, BackgroundService, and When to Prefer Composition (included with Full Access)16 min
    3. 12State Pattern in C#: Order Lifecycles, Invalid Transitions, and Transition Tables With Tuple Patterns (included with Full Access)18 min
    4. 13Command Pattern in C#: Undo and Redo, Queued Commands With Channels, Idempotency and CQRS Commands (included with Full Access), 1 practice test17 min

    Module 5 · Behavioral Patterns: Communication and Pipelines

    4 lessons · 1 h 12 min
    1. 14Observer in C#: Events, IObservable<T>, Safe Unsubscription, Handler Isolation and In-Process Domain Events (included with Full Access)18 min
    2. 15Mediator in C# and MediatR: Requests, Notifications, Pipeline Behaviors, and When a Mediator Is Overkill (included with Full Access)18 min
    3. 16Chain of Responsibility in .NET: ASP.NET Core Middleware, Short-Circuiting, Ordering and Handler Pipelines (included with Full Access)18 min
    4. 17Visitor and Pattern Matching in C#: Double Dispatch, Expression Trees, ExpressionVisitor and Switch Expressions (included with Full Access), 1 practice test18 min

    Module 6 · Judgment, Practice and Mock Interview

    3 lessons · 1 h 13 min
    1. 18When Not to Use Patterns: Anti-Patterns, Over-Engineering, and Modern C# Alternatives That Replace Them (included with Full Access)18 min
    2. 19Design Patterns Practice Set: 10 Drills on Finding, Fixing and Choosing Patterns in Real C# Code (included with Full Access)20 min
    3. 20Final Mock Interview: 25 Questions on Design Patterns, SOLID and Modern C# for .NET Interviews (included with Full Access)35 min