Replies: 3 comments
-
Through domain events and domain event handlers. Never directly call another command from a command handler. See: https://medium.com/workleap/why-command-should-not-call-command-in-cqrs-5da046a9fed1 |
Beta Was this translation helpful? Give feedback.
-
Could you provide an example of a possible solution for the following scenario: To avoid such problems, it is generally recommended to keep commands self-contained and not have them call other commands directly. Instead, if there is a need for multiple commands to be executed together, a higher-level command or workflow can be created to orchestrate the execution of the individual commands. |
Beta Was this translation helpful? Give feedback.
-
hi |
Beta Was this translation helpful? Give feedback.
-
hi
In a Clean Architecture approach using C#, calling one use case from another is a common scenario. Let's say we have two use cases: UseCaseA and UseCaseB, where UseCaseA needs to call UseCaseB.
For example, the CreateInvoiceCommand needs to call the CreateWalletCommandHandler.
How should this be implemented in a Clean Architecture framework?
Beta Was this translation helpful? Give feedback.
All reactions