Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
.NET 8 Microservices - DDD, CQRS, Vertical/Clean Architecture
.NET 8 Microservices - DDD, CQRS, Vertical/Clean Architecture

.NET 8 Microservices - DDD, CQRS, Vertical/Clean Architecture: Master Microservices Architecture with .NET 8 and Modern Patterns

Arrow left icon
Profile Icon Mehmet Ozkaya
Arrow right icon
Free Trial
Video Nov 2024 28hrs 30mins 1st Edition
Video
Can$101.99
Subscription
Free Trial
Arrow left icon
Profile Icon Mehmet Ozkaya
Arrow right icon
Free Trial
Video Nov 2024 28hrs 30mins 1st Edition
Video
Can$101.99
Subscription
Free Trial
Video
Can$101.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Key benefits

  • Explore DDD, CQRS, and architectural patterns for scalable systems
  • Leverage .NET 8 and C# 12 features, including minimal APIs and EF Core advancements
  • Work with RabbitMQ, Redis, Docker, and gRPC for modern development

Description

This comprehensive course takes you through the journey of building microservices with .NET 8, starting from core concepts and architectural patterns. You’ll explore foundational topics like DDD and CQRS, advancing to Clean and Vertical Slice Architecture, with practical coding demonstrations and real-world applications. The course emphasizes modular, scalable development using modern .NET practices. Gain in-depth knowledge of integrating .NET 8 with tools and frameworks such as Docker, RabbitMQ, gRPC, and Redis to build robust microservices ecosystems. From database management using PostgreSQL and Marten to handling synchronous and asynchronous communication patterns, you’ll learn the essential components of a production-ready microservices application. Designed for hands-on learning, this course includes setting up API gateways with YARP, deploying shopping web clients, and orchestrating containerized services with Docker Compose. By the end, you’ll have the skills to design efficient, scalable, and resilient microservices.

Who is this book for?

This course is designed for experienced developers familiar with C# and .NET who want to specialize in microservices development. Prior knowledge of APIs, database design, and containerization is recommended. Ideal for professionals aiming to advance in enterprise software development or cloud-native solutions.

What you will learn

  • Design scalable microservices using DDD and CQRS principles
  • Build containerized .NET apps with Docker and Docker Compose
  • Implement RabbitMQ, gRPC, and API Gateway for communication
  • Manage data efficiently with PostgreSQL, Redis, and EF Core
  • Develop APIs using Clean Architecture and Vertical Slice patterns
  • Ensure reliability with logging, validation, and error handling

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 28, 2024
Length: 28hrs 30mins
Edition : 1st
Language : English
ISBN-13 : 9781837025176
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Nov 28, 2024
Length: 28hrs 30mins
Edition : 1st
Language : English
ISBN-13 : 9781837025176
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts

Table of Contents

21 Chapters
Course Introduction Chevron down icon Chevron up icon
What are Microservices? Chevron down icon Chevron up icon
Why .NET and What is new .NET 8 and C# 12? Chevron down icon Chevron up icon
ASP.NET 8 for Microservice Development: Minimal APIs, DI, Routing, and Docker Chevron down icon Chevron up icon
First Microservice: Catalog.API with Vertical Slice Architecture and CQRS Chevron down icon Chevron up icon
Develop Catalog.API Infrastructure, Handler, and Endpoint Classes for CRUD Chevron down icon Chevron up icon
Introduction - Develop Catalog.API Infrastructure, Handler, and Endpoint Classes
Infrastructure - Data Concerns for Catalog API - Marten .NET Transactional DB
Opening Sessions in Marten as Document DB
Develop CommandHandler to Save Product to DB using Marten Library
Register and Configure Marten DocumentDB Library into Program.cs ASP.NET DI
EShop Microservices Deployment Strategy
Setup PostgreSQL DB Using Docker-compose File for Multi-container Docker Environment
Add PostgreSQL DB Image into Docker-compose File for Multi-container Docker Environment
Run Docker-Compose on Visual Studio to Setup PostgreSQL DB on Docker
Connect Postgres DB from Local Catalog Microservices and Send POST Request
Develop GetProducts Feature in Vertical Slice with CQRS, MediatR in Handler Class
Develop GetProducts GET Endpoint with Minimal APIs and Carter
Test GetProducts Endpoint Connecting to Docker Postgres Container
Create Postman Collection for EShop Microservices
Develop GetProductById Handler with CQRS and MediatR
Develop GetProductById GET Endpoint with Minimal APIs and Carter
Test GetProductById Endpoint Connecting to Docker Postgres Container
Develop GetProductByCategory Handler with CQRS and MediatR
Develop GetProductByCategory GET Endpoint with Minimal APIs and Carter
Test GetProductByCategory Endpoint Connecting to Docker Postgres Container
Develop UpdateProduct Handler with CQRS and MediatR
Develop UpdateProduct PUT Endpoint with Minimal APIs and Carter
Test UpdateProduct Endpoint Connecting to Docker Postgres Container
Develop DeleteProduct Handler with CQRS and MediatR
Develop DeleteProduct DELETE Endpoint with Minimal APIs and Carter
Test DeleteProduct Endpoint Connecting to Docker Postgres Container
Develop Catalog.API Cross-Cutting Concerns Chevron down icon Chevron up icon
Basket Microservices with Vertical Slice Architecture and CQRS Chevron down icon Chevron up icon
Introduction - Basket Microservices with Vertical Slice Architecture and CQRS
Create ASP.NET Web API for Basket.API Microservice in Microservices Solution
Set Port Numbers for Basket.API Microservice - Modify Launch Settings
Domain Analysis of Basket Microservices: Models, UCs, REST APIs, Databases
Technical Analysis of Basket Microservices: Architectures, Patterns, Libraries
Develop Basket.API Microservices Creating Domain Entities
Develop Vertical Slice Feature Folder with CQRS and MediatR
Develop GetBasket Feature Handler Class with CQRS and MediatR
Develop Get Basket Endpoint with Minimal APIs and Carter
Develop StoreBasket Feature Handler Class with CQRS and MediatR
Develop Store Basket Endpoint with Minimal APIs and Carter
Develop DeleteBasket Feature Handler Class with CQRS and MediatR
Develop Delete Basket Endpoint with Minimal APIs and Carter
Register MediatR and Carter Libraries into ASP.NET Dependency Injection Service
Test Basket API - GET and POST Basket Request - Debug Carter Minimal API
Infrastructure - Data Concerns for Basket API - Marten .NET Transactional DB
Develop BasketRepository Class using Marten Library
Implement IBasketRepository Class using Marten IDocumentSession Interface
Register and Configure Marten DocumentDB Library into Program.cs ASP.NET DI
Setup PostgreSQL DB for Basket Microservices Using Docker-Compose File
Run Docker-Compose on Visual Studio to Setup PostgreSQL DB on Docker
Develop Basket Features in CQRS Handler Classes Using BasketRepository
Connect PostgreSQL DB from Local Basket Microservices and Send POST Request
TEST Basket Microservices Endpoints Connecting with Marten and PostgreSQL DB
Exception Handling in Basket Microservices
Basket Microservices Apply Distributed Caching with Redis Chevron down icon Chevron up icon
Microservices Synchronous Communications with gRPC Chevron down icon Chevron up icon
Discount.Grpc Microservices for Microservices gRPC Communication Chevron down icon Chevron up icon
Consuming Discount gRPC Service From Basket Microservice When Adding Cart Item Chevron down icon Chevron up icon
Ordering Microservices with DDD, CQRS, and Clean Architecture Chevron down icon Chevron up icon
Ordering.Domain Layer with Tactical Domain-Driven Design Patterns Chevron down icon Chevron up icon
Ordering.Infrastructure Layer with EF Core Code First and SQL Server Chevron down icon Chevron up icon
Develop Ordering.Infrastructure Layer with EF Core Code First Approach
EF Core 8 Features, Code First Approach, Migrations, and SQL Server Connection
Steps of EF Core Developments for Ordering.Infrastructure
Install EF Core NuGet Packages in Ordering.Infrastructure
Develop EF Core DbContext Object for Storing Entities in Ordering.Infrastructure
Mapping DDD Objects to EF Entities - Develop EF Core Entity Configurations
EF Core 8 Relations and DDD ValueObject Mapping with ComplexType and ComplexProp
Mapping DDD Objects to EF Entities - Develop Order Entity Configurations
EF Core SQL Server Connection String in appsettings.json File
Register EF Core DbContext in ASP.NET Dependency Injection Tool for SQL Server
Create EF Core Migrations for ApplicationDbContext in Ordering.Infrastructure
Create EF Core Migrations for ApplicationDbContext in Ordering.Infrastructure - Part 2
Setup SQL Server DB Using Docker-Compose File for Multi-Container Docker Environment
Run Docker-Compose on Visual Studio to Setup SQL Server DB on Docker
Apply EF Core Migrations to SQL Server DB with Update-Database Command
Auto Migrate EF Core Entities to SQL Server When Application Starts
Seed SQL Server OrderDb Using EF Core When Application Starts
Seed Products and Orders in SQL Server OrderDb Using EF Core When App Starts
Run Ordering Microservices to Migrate and Seed OrderDb in SQL Server Using EF Core
EF Core Interceptors: SaveChangesInterceptor for Auditing Entities
Develop SaveChangesInterceptor to Audit Entities for Order Entities
Run & Test Ordering Microservices for Audit with EF SaveChangesInterceptor
Dispatch Domain Events with EF Core SaveChangesInterceptor
Develop DispatchDomainEventsInterceptor to Trigger Domain Event Handlers
Run & Test Ordering Microservices for Dispatching Domain Events with EF SaveChangesInterceptor
Ordering.Application Layer with CQRS and MediatR Chevron down icon Chevron up icon
Ordering.API Layer Exposing Minimal API Endpoints with Carter and REPR Pattern Chevron down icon Chevron up icon
Microservices Async Communication with RabbitMQ & MassTransit for Checkout Order Chevron down icon Chevron up icon
Introduction - Microservices Async Communication with RabbitMQ & MassTransit
Microservices Asynchronous Communication
Benefits of Asynchronous Communication
Challenges of Asynchronous Communication
Fan-Out Publish/Subscribe Messaging Pattern
Event-Driven Microservices Architecture
What is RabbitMQ and Main Components of RabbitMQ (Producer, Queue, Consumer)
RabbitMQ Exchange Types: Direct, Fanout, Topic, and Headers
Domain Analysis of Async Communication Between Basket and Ordering Microservices
Technical Analysis of Async Communication Between Basket and Ordering Microservices
Steps of Developing Async Communication Between Basket and Ordering Microservices
Create BuildingBlocks.Messaging Shared Class Library for Common Async Connection
Develop BasketCheckout Event in BuildingBlocks.Messaging Shared Class Library
Develop MassTransit Extension Methods to Register RabbitMQ Connection into DI
Develop MassTransit Extension Methods to Register RabbitMQ Connection into DI - Part 2
Publish BasketCheckout Event from Basket Microservices
Develop BasketCheckout Feature Folder to Expose POST Endpoint and Publish Event
Develop Basket Checkout Handler Method to Publish Event to RabbitMQ-MassTransit
Dual-Write Problem and Outbox Pattern
Ordering Microservices to Subscribe/Consume BasketCheckout Event from RabbitMQ
Register MassTransit RabbitMQ Packages into Ordering.Application DI
OrderCreated Integration Event: How Domain Event Leads to Integration Event
Develop Basket Checkout Event Consumer Integration Event Handler Class
Develop Basket Checkout Event Consumer Integration Event Handler Class - Part 2
Saga Pattern for Distributed Transactions
Publish OrderCreated Integration Event for Order Fulfillment Microservices
ASP.NET Feature Management - Develop Feature Flag for OrderCreated Event
Setup RabbitMQ for Async Communication Using Docker-Compose File
Run Docker-Compose on Visual Studio to Setup RabbitMQ on Docker
TEST - Publish BasketCheckout Event in Basket.API Microservices
TEST - Subscribe/Consume BasketCheckout Event in Ordering.API Microservices
TEST - Set OrderFulfillment Feature = False. Re-Test Publish - Subscribe/Consume
Containerize and Configure Basket, Ordering, and RabbitMQ Containers
Containerize and Orchestrate Ordering Microservices with Docker & Docker-Compose
TEST - Docker-Compose Microservices - Publish/Subscribe BasketCheckout Event
Building API Gateways with YARP Reverse Proxy Applying Gateway Routing Pattern Chevron down icon Chevron up icon
Building Shopping Web Client Application with Refit HttpClientFactory Library Chevron down icon Chevron up icon
Introduction - Shopping Web Client Application with Refit HttpClientFactory
Background of Project
Domain Analysis of Shopping.Web Microservices
Technical Analysis of Shopping.Web Microservices
Developing Shopping Web Application Microservices
Create Catalog Models for Shopping Web Application Microservices Consume YarpApi
Create Basket Models for Shopping Web Application Microservices Consume YarpApi
Create Ordering Models for Shopping Web Application Microservices Consume YarpApi
Develop Service Classes for Consume YarpApiGateway
Refit HttpClientFactory Library: The Automatic Type-Safe REST Library
Install and Configure Refit HttpClientFactory Library in Shopping.Web Microservices
Develop ICatalogService Classes with Refit HttpClientFactory Library
Develop IBasketService Classes with Refit HttpClientFactory Library
Develop IOrderingService Classes with Refit HttpClientFactory Library
Build Presentation Layer: ASP.NET Web Application Razor Pages with AspNetRunBasics
Develop Index HTML Pages and CS Files with Shared Partial Product Pages
Develop Index C# Page to Consume YarpApiGateway Endpoints with ICatalogService
AddToCart Submit Handle in Index CSHTML Page with IBasketService
Develop Cart Razor Page in Shopping.Web Application
Develop Cart C# Page and Consume YarpApiGateway Endpoints with IBasketService
Develop ProductList Razor Page in Shopping.Web Application
Develop ProductList C# Page and Consume YarpApiGateway Endpoint with IBasketService
Develop ProductDetail Razor Page in Shopping.Web Application
Develop ProductDetail C# Page and Consume YarpApiGateway Endpoints
Develop Checkout and Confirmation Razor Page in Shopping.Web Application
Develop Checkout and Confirmation C# Page and Consume YarpApiGateway Endpoints
Develop OrderList and Contact Razor Page in Shopping.Web Application
Develop OrderList C# Page and Consume YarpApiGateway Endpoints with IBasketService
TEST - Shopping.Web Client Application Using YarpApiGateway Microservices
Containerize and Orchestrate Shopping.Web Application in Docker-Compose
TEST on Docker-Compose - Shopping.Web Application Consumes YarpApiGateway
Thanks Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.