Hi guys,
In our application, we designed some small aggregates, but still some business constraints should apply to those smaller aggregate, can I have a query repository in my command handler(or in the aggregate)?
Otherwise I will have a transaction open before I dispatch the command.
yes, that’s possible. If it’s undesirable to have the additional data as part of a command, it’s possible to use a repository to add that information in the command handler (or aggregate, if you prefer that type of design).