title: Can I register all IoC container components in single layer, or each layer where used?
body: <p>I'm using the Unity IoC framework and have a <code>Bootstrapper.cs</code> class in my host MVC layer to register all components. However in my architecture I have a 'services' layer below the MVC layer, that too uses DI and there are <em>repository interfaces</em> injected into it (repository interfaces are not used in the MVC layer - it has the services layer Interface injected into its Controllers).</p>
  
  <p>So my question is the following: can I still register the repository interface to it's concrete  type in the MVC/UI layer for the entire app, or do I add another reference to Unity and create another <code>Bootstrapper.cs</code> class in my 'services' layer to define Interface types for that <em>that specific</em> layer uses?</p>
  
  <p>Even if the answer is <em>I can</em> register the Interface in the UI layer, I'd still like to know the common practice too. The thing I <em>don't</em> like about registering that type in the MVC/UI layer is I would have to add a reference to the Repository layer just to make the registration, even know it is not used in that layer. It's used in the services layer.</p>
  
  <p>Thanks!</p>