I am struggling with construction of ValueObjects during life cycle of a command.
Here is my situation:
- Command Request comes to controller action.
- Create command object with request params.
- Pass command object to app service
- Command handler first validate command attributes
- then create aggregate and pass command attributes to aggregate function.
- and aggregate function pass attributes to domain event.
My question is where I should put Object Creation logic. or in other words which component of DDD is responsible for initialisation of Objects (Value Objects, Entities etc.) for Aggregates to work with?