
Outline a high level microservices design, detailing front-end flow through an api gateway, jwt identity, diverse data stores, saga orchestration, event-driven patterns, outbox, and scalable devops on aks.
Explore the GitHub branch strategy for a dotnet 10 and angular 21 microservices project, including navigating 12 branches, the default aspire branch, and docker compose deployment.
Explore the solution overview for an ecommerce microservices app built in 24 projects across api, application, core, and infra layers; compare mediator and plain cqrs, custom mappers, and docker-compose deployment.
Meet the instructor, a principal architect at Datamatix and former Microsoft MVP, who shares insights on dotnet microservices, AI, ML, and clean architecture, with active LinkedIn, Medium, and GitHub presence.
Learn how to set up correct project references in a clean architecture for .NET core microservices, linking API, application, infrastructure, and core layers, and validating by rebuilding.
Create a base entity blueprint for all domain models by defining a MongoDB-backed base class with an ID property and serialization attributes, then scaffold product-related entities.
Create a product entity from the base entity, including name, summary, description, image, brand name, type name, price as decimal 128, with created and updated dates, plus interfaces and repositories.
Create a generic pagination class in a clean architecture project, with page index, page size, count, and read-only data collection of T where T is a class, plus a specification.
Create the iProductRepository interface with async operations for products, including getAllAsync, getProducts with pagination and specParams, and filters by name or brand and ID, plus getProduct by ID.
Implement a Mongo-based product repository with constructor injection and configuration, implementing iProductRepository and providing create, delete, get, update, and search by name or brand with catalog spec params.
Explore replacing config with IOptions to bind strongly typed database settings, inject options in repositories, and wire up the Mongo client via program.cs for safer, testable configuration.
Create a database seeder class to seed brands, types, and products from JSON files at startup, using a seed path, async reads, and Mongo-generated IDs.
Implement a get all types query and handler, inject the type repository, and map results to a types response with a custom mapper, mirroring the brands pattern.
Implement a get product by brand query and its handler. Wire repository calls, map to product responses, and return the list.
Create a get product by id query and its handler to retrieve a product by id from the repository and return a product response.
Wire up all components in program.cs by configuring custom MongoDB serializers for GUID and date time offset serializers as strings for readability, and register controllers, swagger, and mediator.
Configure launch properties for .NET core microservices by naming profiles, setting ports 8000 and 5000, enabling swagger and automatic browser launch, and preparing Docker MongoDB integration.
Set up docker for a dotnet core microservice, enabling container and docker compose, with a multi-stage build and catalog db using mongo and environment overrides.
Demonstrates catalog microservice setup with docker-compose, fixes Mongo data volumes, seeds data, and tests APIs like get products, get brands, types, and create or delete products on port 8000.
Create a basket checkout entity with username, total price, address details, and card details, then define shopping cart and cart item entities for the checkout flow.
Create shopping cart item and shopping cart entities for a .NET Core microservice using clean architecture, including quantity, unit price, product id, image, and a username with item list.
Model shopping cart response DTOs in a net core microservice using record classes with init properties, including item responses and a total price calculated from item price multiplied by quantity.
Implement a get basket by user name query and handler using mediator, fetch the shopping cart from the repository, and map it to a shopping cart response with item details.
Implement a delete basket by username command and handler in a clean architecture microservice, using a string username, a unit return, and a basket repository to perform the deletion.
Create basket and cart item dtos for a .NET microservice, modeling product id, name, image, price, and quantity with positional parameters, plus a cart with user name and total price.
Create a basket controller in the api layer and wire MediatR to handle get basket by username query, create shopping cart command, and delete basket by username command.
Wire up program.cs by adding a cache settings poco with a connection string bound from app settings via the options pattern, configure mediator and stack exchange radius cache at localhost:6379.
Fix the program.cs issue by using the action radius cache options overload and removing the service provider. Build succeeds; prepare to move to the next video.
Adjust launch properties for basket API and catalog, align http/https ports and profiles, and prepare dotnet run with swagger in a dockerized container.
Update docker file and compose to enable orchestration and automatic assembly scanning, add basket and catalog services, configure basket DB and environment settings, then verify with a successful rebuild.
See a from-scratch basket microservice demo using docker, building layers, and composing the e-commerce stack with .NET, Redis, and Mongo, then test create and delete operations.
Install NuGet packages for the infrastructure layer—dapper, gRPC asp.net core, PostgreSQL, mediator, and gRPC library—while noting swagger is unnecessary for the http2 protobuf based discount and basket services.
Develop the discount query and its handler within a clean architecture, organizing queries, commands, handlers, and mappers, and define a coupon dto with validation and mapping.
Seed the database on startup via an infrastructure extension that migrates the database with database settings and retries while inserting adidas quick force indoor and unix racket coupons.
Apply iOptions to retrieve the current configured database settings from the DI container and inject them where needed. Rebuild confirms the configuration works and prepares for creating the protobuf file.
Create discount.proto in a protos folder with proto3 syntax to define message contracts, rpc methods for get, create, update, delete discount, and configure protobuf compiler for grpc code on server.
Implement asynchronous create, update, and delete discount commands, map DTOs, and send commands via mediator, then build and wire program.cs to finalize the discount service.
Create a SQL Server backed DbContext in a clean architecture project by wiring an order context, defining Orders DbSet, and applying audit fields (created and last modified) during SaveChangesAsync.
Implement a generic async repository base for EF Core that supports add, delete, get all, get by id, and update using an order context and no-tracking queries.
Learn to replace mediator-based CQRS with a clean command pattern and a feature-focused folder structure for orders, including commands, queries, and mappers.
Create a custom order mapper with a static to-dto method mapping order fields to an order dto, handle nulls, and fix the dto constructor by adding expiration.
Create an order command and handler in a .NET core microservice with clean architecture. Map the command to an order entity, persist via the repository, and return generated order id.
Create a delete order command and handler in a clean architecture .NET core microservice, implement command interfaces, inject IOrderRepository and logger, check by id, delete async, and log actions.
Create a design-time db context factory for the order context, load configuration from app settings, configure the connection and retry logic, apply migrations, and prepare for seeding.
Create and wire a service collection extension to centralize dependency injection for a .NET core microservice, configuring SQL Server, repositories, CQRS handlers, fluent validation, and decorator pipelines.
Wire the program.cs file by wiring ordering services with CQRS and infra components using builder.configuration, update app settings for the order connection string, and keep controllers, OpenAPI, and maps intact.
Create a db extension that migrates the database at startup, using a hosted extension method on IHost, with a Polly-based retry policy and a seeder to initialize data.
Implement database seeding in program.cs by pairing migrate database with order context seed. Use services and a logger to run the seed asynchronously at startup and wait for completion.
Create a base integration event with correlation id, creation date, and audit fields to accompany all events, enabling cross-service tracing and time travel debugging across microservices.
Inherit the base integration event to create a basket checkout event and include basket entity properties. Define an event bus constant for the basket checkout queue to route messages.
Connect the basket microservice to the event bus by adding a project reference to the event bus messages project and installing MassTransit packages to relay messages to the broker.
Create a .NET microservices basket mapper with to-entity and basket checkout mappings, transforming response data into shopping cart items and a basket checkout event including user, address, and payment details.
Register mass transit in basket api program.cs and wire rabbitmq as the event bus, using host configuration; mirror the consumer setup in the ordering microservice.
Install NuGet packages within the ordering microservice's application layer and maintain version consistency. Add project references to event bus messages, then implement the consumer in the ordering service.
Wire up the ordering program.cs by configuring mass transit as a rabbitmq consumer, map basket ordering consumer, set event bus settings, and recreate the docker file for infrastructure.
Set up docker container support for basket and ordering microservices, configure rabbitmq and compose overrides, and rebuild images to run a containerized .net core microservices architecture.
Show how to perform end-to-end basket checkout in a .net core microservices setup by downgrading mass transit to resolve licensing and using RabbitMQ and docker compose for async checkout.
Explore the saga pattern for long-running distributed transactions, using forward and compensating actions, with orchestrator and choreography approaches, and understand eventual consistency and the outbox pattern.
Define an outbox message entity with base audit properties, correlation id, and processing timestamps to support saga and outbox patterns in order processing.
Extend the iOrderRepository to support outbox messaging by adding an AddAsync(outboxMessage) method and implementing it in infrastructure with orderContext.outboxMessages.AddAsync and save changes async, preparing for checkout handler updates.
Register outbox message dispatcher in Program.cs as a hosted background service with mass transit, scanning pending messages and publishing to the broker, and upgrade EF migrations to apply outbox table.
Execute ef migrations to add the outbox table and apply database updates, then rebuild and run docker compose to validate the ordering microservice and outbox pattern.
Demonstrates managing .Net core microservices with docker, including outbox table demo, saga flow, and dockerized checkout that publishes to message broker, while handling SQL Server readiness and pending state.
Create a lightweight payment microservice as a simple API project under e-commerce services, avoid clean architecture for now, and start with a background service while removing the weather forecast pieces.
Install and restore NuGet packages directly from the current project, add the event bus messages dependency, and wire up project references to prepare the payment microservice for the consumer phase.
Develop and wire an order created consumer in the payment microservice using MassTransit iConsumer to handle order created events, simulate payment processing, and publish payment completed or failed events.
Complete the order creation consumer by publishing a completed event on success or a payment failed event on error, including order ID and correlation ID, and the failure reason.
Wire up program.cs by configuring mass transit, registering the order created consumer, and defining RabbitMQ queues such as order created queue, payment completed queue, and payment failed queue.
Extend the listeners to react to payment outcomes events and update order state, enabling the saga orchestrator to apply the payment result to the saga step.
Create a payment failed consumer in a .net core microservice, wire it to the order repository and logger, update the order status on failure, and log the failure reason.
wire up the ordering api in program.cs by registering basket checkout, payment completed, and payment failed consumers, configure endpoints and queues, and prepare docker configuration for payment.
Fix a payment service registration issue by undoing a misplaced mass transit setup, correctly wiring the DI, rebuilding the app, and proceeding to the next video demo.
Demonstrates saga orchestration using an outbox pattern in a .net core microservices setup. The demo covers basket API operations, checkout, order state changes, and RabbitMQ messaging.
Create a simple identity microservice to handle authentication and authorization, using a dedicated identity project under services, with optional container support and straightforward template setup.
Create an application user model inheriting IdentityUser and an identity db context to map EF Core identity tables and enable migrations with custom fields like first name and last name.
Wire up program.cs to configure EF core identity with the app identity db context and SQL server. Enable JWT authentication, token validation, and authorization, and integrate swagger for API documentation.
Create dto types to exchange data over the wire via folders. Define a register dto with first name, last name, email, and password, and a login dto for the controller.
Apply migrations to initialize and update the identity database, create the migrations folder, and deploy with docker compose while using dotnet ef migrations and dotnet ef database update.
Register a user, login to obtain a JWT token, and inspect its claims like subject, expiration, issuer, and audience, with notes on Azure AD delegation for service authentication.
Disclaimer
This course requires you to download Docker Desktop from the official Docker website.If you are a Udemy Business (UFB) user, please check with your employer before downloading or installing third-party software.
Creating .NET Core Microservices using Clean Architecture
(.NET 10 • Angular 21 • CQRS • Saga • Event-Driven Architecture)
Welcome to “Creating .NET Core Microservices using Clean Architecture” — a deep, production-first, architecture-driven course designed for developers who don’t just want to build microservices, but want to build them correctly.
This is not a toy project course.This is a 51+ hour, enterprise-grade journey where you design, implement, evolve, and deploy a real-world eCommerce system using modern .NET, Clean Architecture, and cloud-native principles.
You will learn how architects think, how systems evolve over time, and how to design microservices that survive scale, change, and complexity.
What Makes This Course Different
Most courses stop at:
Basic CRUD services
Framework-centric tutorials
Shallow abstractions
This course goes far beyond that.
You will build real microservices using:
Clean Architecture (Hexagonal, Ports and Adapters)
Plain CQRS with clear read/write separation
MediatR for command and query orchestration
Saga Pattern (Orchestration and Choreography)
Event-Driven Architecture
Asynchronous microservices using RabbitMQ
Outbox Pattern for reliable message delivery
Explicit, high-performance mapping (AutoMapper removed)
Strategy Pattern, Repository Pattern, Specification Pattern
Cloud-ready, scalable, and testable system design
Every concept is taught with purpose: why it exists, when to use it, and when not to.
A Living, Evolving Architecture (Phase-Wise Upgrades)
This course is actively evolving, and you receive all upgrades at no additional cost.
Phase 1 (Current)
Full migration to .NET 10
Strict Clean Architecture enforcement
CQRS and MediatR refactoring
Saga Pattern implementation
Outbox and idempotency improvements
Removal of AutoMapper in favor of explicit mapping
Event-driven asynchronous workflows
Phase 2 (Planned)
Upgrade from Angular 18 to Angular 21
Modern frontend architecture
Improved state management
Clearer frontend and backend boundaries
Phase 3 (Planned)
Upgrade Azure hosting from .NET 8 to .NET 10
Cloud-native optimizations
Improved AKS and Helm deployments
Enhanced observability and monitoring
If you enroll now, you will receive all future upgrades automatically.
What You Will Build
You will design and implement a complete eCommerce system composed of multiple independent microservices, including:
Catalog Microservice
Basket Microservice
Ordering Microservice
Discount and Payment workflows
Identity and Security services
API Gateway
Event-driven communication pipelines
Each service follows:
Clean Architecture boundaries
Independent data ownership
Clear contracts
Scalable communication patterns
Security, Communication, and Infrastructure
You will gain hands-on experience with:
Azure AD and ASP.NET Core Identity
Secure service-to-service communication
RabbitMQ for asynchronous messaging
gRPC for high-performance inter-service communication
Ocelot, Azure API Gateway, and NGINX
Istio Service Mesh for traffic management
Docker and Kubernetes
Azure Kubernetes Service (AKS)
Helm charts for automated deployments
Data Storage and Caching Strategies
You will work with multiple data technologies commonly used in modern systems:
SQL Server
MongoDB
PostgreSQL
Redis for caching and performance optimization
You will learn when and why to use each technology in real-world scenarios.
Testing, Reliability, and Maintainability
This course emphasizes:
Testable core business logic
CQRS-friendly testing strategies
Decoupled domain rules
Long-term maintainability
Real refactoring techniques used in production systems
Who This Course Is For
This course is suitable for:
Freshers who want to build scalable systems correctly from the start
Junior developers aiming to move beyond CRUD-based development
Mid-level developers seeking architectural depth and scalability knowledge
Senior developers modernizing their microservices skill set
Technical leads designing systems that teams can scale confidently
Software architects building distributed, fault-tolerant systems
Course Statistics
33+ sections
365+ in-depth videos
33+ hours of content
Multiple choice questions
Yearly updates
Lifetime access
Why This Course Stands Out
Architecture-first approach
Production-grade implementation
Deep focus on real-world patterns
Continuous upgrades
Hands-on, practical learning
Exceptional long-term value
Final Note
Frameworks change.
Cloud platforms evolve.
Trends come and go.
Good architecture lasts.
This course does not just teach you how to build microservices. It teaches you how to think, design, and evolve systems like an architect.
Enrol now to secure to all upcoming .Net 10 and Angular 21 upgrades.