title: How to aggregate repositories?
body: <p>I am working on a large-scale system for a telecom company. I am new to DDD and having hard time linking different pieces together. Our current system is build using NHibernate. It currently has well over 600 tables and all data access is done using NHibernate but for the new system we will be using EF. Below are few functional areas and examples of database tables in each functional area.</p>
  
  <p>Customers<br>
      -----> CustomerDemographics<br>
      -----> CustomerPayments<br>
      -----> CustomerTransactions  </p>
  
  <p>RoutingEngine<br>
      -----> InboundRoutes<br>
      -----> OutboundRoutes  </p>
  
  <p>ProvisioningEngine<br>
      -----> InboundSwithces<br>
      -----> OutboundSwitches<br>
      -----> RouterConfigs<br>
      -----> GatewayConfigs  </p>
  
  <p>BillingEngine<br>
      -----> InboundTraffic<br>
      -----> OutboundTraffic  </p>
  
  <p>Since the system has to be unit-testable, I started abstracting actual entities with a repository pattern. One approach is to create one repository object for each  each database table. Of course all these repository classes could be  derived from a generic repository interface. However this will be adding quite a bit of overhead in terms of code base maintenance. In DDD, I read about this concept of Aggregates but I am not sure how it should be applied specially in context of EF. Should the Aggregate objects are container of these repositories or are these more of a container of related contexts (meaning something along the lines of Bounded DbContexts)?</p>