View on GitHub
Clean Architecture Toolkit for .NET
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications.
It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design.

|   HOME   |   MODULE OVERVIEW   |   DEMO   |

Plans for Cat.Commands

Open question for the existing Cat.Commands module: may a command carry a result?
Status: not started. Cat.Commands itself exists. This plan collects what we know. The open questions need an answer before the build.

Contents

The idea

The module readme says a command changes state and returns no data, only the outcome. Use a query to read data.

A real use case pushes against that. When a command creates an order, the caller wants the new order id, the order number and the time. The demo solves it by putting result properties on the command, which the handler fills in after it runs. That works, but the module does not say it is allowed. We need to decide whether this is a supported pattern, a thing to avoid, or a reason for a change in the module.

What we already know

From the module readme:

From the demo:

Decisions and open questions

Decided

Topic Decision
Current rule The readme says a command returns no data. Nothing newer is decided.

Open

Questions before building

  1. May a command carry a result?
  2. If yes, is a property filled by the handler enough, or do we want a typed command?
  3. If no, how does the demo get the order number back?
  4. Should the readme describe the chosen pattern?