c# - determining aggregate root in MyProducts and ebay and amazon listings -


should make listings part of myproduct aggregate or should aggregate roots.

if make part of myproduct aggregate loose ability persist listings independently of myproduct. on other hand dont see how can have listing without myproduct , therefore should part of myproduct aggregate.

should ebay , amazon listing value objects or entities.

from experience ecommerce product catalogs, typically have multiple listings per product represent product variations example. ultimately, both listing , corresponding product should aggregates. doesn't mean can't enforce constraint listing must associated product. means instead of direct object reference use identity reference express relationship. behaviors on listings typically independent behaviors on corresponding product. if there dependency, can propagated in consistent manner.

take @ effective aggregate design more on this.


Comments