title: Regarding DDD Structure and Layering.
body: <p>Folks,
  Apologies if this has been covered in another thread, but I have searched ddd and mvc articles and have not found a straightforward answer.</p>
  
  <p>I am hoping to apply a DDD approach to the architecture of my MVC projects. Please correct me where I am wrong.</p>
  
  <p>All MVC controller actions that involve hitting the domain model will initially hit 
  and application service layer.
  The application service layer here acts as a facade between presentation and the domain.
  Any requests from the application service later that clearly involve discrete domain aggregates will perform fetch or modify operations on aggregate roots using repositories. Each aggregate root will have its own repository.</p>
  
  <p>so the application service layer must be injected with any/all repositories required by the domain.</p>
  
  <p>Where an operation may involve multiple aggregates or requires logic that does not fit neatly into one aggregate, the application service will call a domain service to carry out operations across aggregates.</p>
  
  <p>This does not seem right to me.
  My confusion is that from a DDD perspective Im not sure whether for example aggregate roots should perform their own persistance i.e. the aggregate gets injected with a repository and then persists/fetches itself or whether as above the application service layer uses repositories to act on or fetch aggregates?</p>
  
  <p>Also if the application service layer is injected with all repositories, does the domain service that the application service layer calls also need repositories injected?</p>
  
  <p>Im keeping CQRS out of this at this point. I want to get the layering and the relationship between services and aggregates sorted out first.</p>
  
  <p>Thanks for any advice.</p>