This course teaches you how to build .NET microservices with CQRS and Event Sourcing. You write the full code yourself. You use C#, MongoDB, SQL Server, and Kafka. You learn each idea step by step so you can use these patterns with confidence.
What You Will Learn
You build each part of the system. You see how commands, events, and data flow work together. You also learn how the read and write paths stay apart.
CQRS and Event Flow
- Handle commands and raise events.
- Use the mediator pattern for command and query dispatch.
- Change aggregate state with event messages.
- Apply event versioning and track changes over time.
- Replay events to rebuild an aggregate state.
Data Stores and Persistence
- Build an event store as the write side in MongoDB.
- Create the read side in SQL Server.
- Use optimistic concurrency control.
- Replay all events to rebuild the full read database.
- Rebuild the read database in a new type, such as PostgreSQL.
Kafka Integration
- Produce events to Apache Kafka.
- Consume Kafka events to update the read database.
Why These Skills Matter
You learn how to keep read and write paths separate. This leads to clean code and clear flow. You also see how event logs help you fix errors and rebuild data.
By the end, you know how to build microservices that scale and stay easy to change.