Updated in May 2025.
This course now features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. This course covers the implementation of CQRS (Command Query Responsibility Segregation) patterns and API development using MediatR for modular communication in .NET-based applications. You’ll learn how to structure applications using CQRS, focusing on the separation of read and write operations, and explore the integration of MediatR for handling commands and queries. With real-world examples, you will see how these patterns improve scalability and modularity in your applications. The journey begins with an introduction to CQRS and its role in managing complex systems by segregating commands and queries. You will learn how to implement CQRS logically and physically in your applications, utilizing MediatR to manage requests effectively. The course continues by exploring the development of catalog and basket modules, applying CQRS principles in real use cases, and handling domain events with MediatR’s INotificationHandler interface. As you progress, you will build REST APIs for catalog and basket modules using minimal APIs, Carter, and the REPR design pattern. You will also dive into handling cross-cutting concerns like validation, logging, and error handling, integrating them into your MediatR pipeline. Additionally, the course addresses caching strategies with Redis, providing a hands-on approach to optimizing performance in distributed systems. This course is designed for developers interested in building scalable, maintainable systems using modular monoliths with CQRS, MediatR, and minimal APIs. It is ideal for those looking to enhance their understanding of modular architecture and API development using .NET 8.