Skip to content

CQRS and Mediator

FullStackHero uses Mediator and CQRS to separate reads and writes while keeping the application layer explicit and testable.

  • Commands change system state (create, update, delete).
  • Queries return data without side effects.
  • Each command/query has a dedicated handler and a contract that defines input and output.

Cross-cutting concerns such as validation, logging, and transaction management can be implemented as Mediator pipeline behaviors. This keeps handlers lean and focused on domain logic.

  • Clear entry points into the domain.
  • Easy to test and reason about.
  • Natural fit for modular vertical slices, where each feature has its own commands and queries.