Let’s say we have Foo as an AggregateRoot. And there are generic Foos as well as EnhancedFoos with a number of extended properties. Is it OK to expose “Actions” on a single aggregate root class for generic and enhanced properties and have validation check to throw exception is enhanced action was called on non-enhanced Foo object? Technically, AggregateRoot in this case will aggregate all possible “Actions” for all supported Foo types?
Obviously a lot depends on domain structure, but I think this hypothetical situation is quite common. Probably basic question but I'm just starting with Aggregates/Roots.
Aucun commentaire:
Enregistrer un commentaire