Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
.NET 9 Microservices, Modular Monolith: DDD & Vertical Slice
Rating: 4.7 out of 5(69 ratings)
587 students
Last updated 4/2026
English

What you'll learn

  • Build 5 real microservices end-to-end — and see how modular monoliths fit in the same solution
  • Implement CQRS & Interceptors using both MediatR and FastEndpoints
  • Use gRPC for synchronous and MassTransit for asynchronous microservices communication
  • Design your system first with C4 diagrams, sequence diagrams and tactical DDD
  • Apply Vertical Slice and Clean Architecture to organize your microservices
  • Apply DDD to model aggregates, value objects and domain events around real business rules
  • Use Docker to containerize your microservices & external dependencies
  • Build flexible Minimal APIs using ASP.NET Core, with or without Carter
  • Build global exception handling middleware for clean, consistent error responses
  • Apply interception with endpoint filters, MediatR behaviors, pre-processors and gRPC interceptors
  • Use GraphQL to query and filter efficiently from a PostgreSQL database
  • Secure your APIs using role-based authentication with .NET Identity and JWT tokens
  • Use Redis as a database to boost your microservice performance
  • Implement a CacheRepository pattern with DbContext and InMemoryCache for faster queries
  • Store your files in Azure Blob Storage or Mongo GridFS for scalable file management
  • Handle domain events to trigger side effects across your services using SaveChangesInterceptor
  • Map DTOs and integration events efficiently using Mapster or AutoMapper

Course content

10 sections175 lectures25h 44m total length
  • What We Will Do1:16
  • What You Will Learn3:29
  • Setup and Requirements1:53
  • GitHub Repositories0:22
  • How to Follow the Course4:00

Requirements

  • Basic knowledge of C# and .NET (classes, interfaces, async/await)
  • Familiarity with REST APIs (HTTP methods, JSON, controllers)
  • Understanding of databases and SQL (basic queries, relations)
  • Familiarity with Visual Studio or VS Code
  • Some experience with Git and GitHub is helpful
  • Familiarity with Docker is a plus

Description

In this course we build real C# microservices and a modular monolith in a .NET 9 solution from scratch: a full MVP for managing scientific articles. You’ll learn how to apply Domain-Driven Design (DDD) and Vertical Slice Architecture to real business workflows — not toy examples.

You'll see how to turn business requirements into bounded contexts, aggregates, value objects and domain events, then implement them end-to-end with C#, ASP.NET Core, EF Core, gRPC, messaging and Docker. Each feature is built as a vertical slice: from the API contract and validation, through command handlers and domain logic, down to persistence and tests.

We implement both synchronous and asynchronous communication between services. You'll learn to differentiate between Core/Critical services (using direct gRPC for reliability) and Domain services (using event-driven architecture with messaging). This gives you practical experience with CQRS and event-driven patterns in a real distributed system.

Along the way we focus on practical architecture decisions: when to use microservices vs a modular monolith, how to design rich domains instead of "anemic" models, how to apply CQRS with MediatR, and how to keep code clean, simple and testable while services communicate over gRPC and messaging.

By the end of this course you will be able to:

  • Design and implement .NET 9 microservices and a modular monolith with DDD and Clean Architecture

  • Apply Vertical Slice, CQRS and event-driven architecture in a real project

  • Model solid aggregates, value objects and domain events

  • Implement sync (gRPC) and async (messaging) communication between services

  • Structure solutions for long-term maintainability and clear boundaries

  • Make pragmatic architecture trade-offs, instead of just following theory

Who is this course for?

Intermediate to senior C# / .NET developers who have already built at least one Web API and want to learn how to design real systems with DDD and microservices/modular monolith.
Ambitious junior developers who are comfortable with C#, ASP.NET Core Web APIs and SQL, and want to move to the next level into architecture and system design.

Software architects who want a concrete end-to-end .NET 9 example of modern architecture patterns.

You should be comfortable with C# fundamentals, have some experience with ASP.NET Core Web APIs, and know basic SQL (tables, relationships, CRUD). It is recommended that this is not your very first C# project, nevertheless I will guide you step by step from an empty solution to a working, production-style architecture.

Who this course is for:

  • Intermediate to senior C# / .NET developers who have already built at least one Web API and want to learn DDD, CQRS and modern microservices / modular monolith architecture in .NET 9.
  • Ambitious junior developers who are comfortable with C#, ASP NET Core Web APIs and SQL, and want to move from “just coding” to designing real systems
  • Developers who want to understand the trade-offs between microservices and a modular monolith
  • Software architects or tech leads looking for a concrete, end-to-end .NET 9 microservices + modular monolith reference implementation