views:

45

answers:

1

Can someone please clarify the following;

if a have the following model;

presentation-->slide-->video

where I have identified presentation as the aggregate root, does this mean that if I want to add a slide to a presentation then I must go through the aggregate root e.g. presentation.addslide(slide myslide) and in a similar fashion if I want to add a video to a slide I also have to go through the aggregate root e.g. presentation.addvideotoslide(video myvideo, int slideNumber)???

Or can I use the slide outwith the presentation and have a method on the slide e.g. slide.addvideo(video myvideo)???

Thanks

+3  A: 

Your first assumption is correct, you are supposed to go through the aggregate root to access value objects and entities contained within the aggregate.

Esko