Mediator and CQS Patterns

This chapter explores the Mediator design pattern, which plays the role of the middleman between the components of our application.

That leads us to the Command-Query Separation (CQS) pattern, which describes how to divide our logic into commands and queries.

Finally, we consolidate our learning by exploring MediatR, an open source implementation of the Mediator design pattern, and send queries and commands through it to demonstrate how the concepts we have studied so far come to life in real-world application development.

In this chapter, we cover the following topics:

  • A high-level overview of Vertical Slice Architecture
  • Implementing the Mediator pattern
  • Implementing the CQS pattern
  • Code smell – Marker Interfaces ...

Get Architecting ASP.NET Core Applications - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.