title: How to register service class with multiple repository types in Bootstrapper file?
body: <p>There are 4 parameterized constructor of one of my service layer(ProductService).
  And all of the 4 constructors are injected with different repository types.</p>
  
  <pre><code>public class ProductService : IProductService
  {
  
     private IUserDal&lt;Users&gt; mUserDal { get; set; }
     private IItemDal&lt;Item&gt; mItemDal { get; set; }
     private IRoleDal&lt;Role&gt; mRoleDal { get; set; }
     private IBranchDal&lt;Branch&gt; mBranchDal { get; set; }
  
     public ProductService (IUserDal&lt;Users&gt; userDal)
     {
         mUserDal = userDal;
     }
  
     public ProductService (IItemDal&lt;Item&gt; itemDal)
     {
         mItemDal = itemDal;
     }
  
     public ProductService (IRoleDal&lt;Role&gt; roleDal)
     {
         mRoleDal = roleDal;
     }
  
     public ProductService (IBranchDal&lt;Branch&gt; branchDal)
     {
         mBranchDal = branchDal;
     }
  }
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>And <strong>ProductService</strong> layer is use in some of the Controller classes.</p>
      
      <p>I am registering this ProductService class to Bootstrapper.cs(Unity DI) file with all of its dependencies types.But it's not registering properly.Some of the examples are below :-</p>
    </blockquote>
  </blockquote>
  
  <p><strong>Type 1:</strong></p>
  
  <pre><code>   container.RegisterType&lt;IUserDal&lt;Users&gt;, UserDal&gt;();
     container.RegisterType&lt;IItemDal&lt;Item&gt;,ItemDal&gt;();
     container.RegisterType&lt;IRoleDal&lt;Role&gt;,RoleDal&gt;();
     container.RegisterType&lt;IBranchDal&lt;Branch&gt;,BranchDal&gt;();
     container.RegisterType&lt;IProductService,ProductService&gt;(); 
  </code></pre>
  
  <p><strong>Type 2:</strong></p>
  
  <pre><code>   container.RegisterType&lt;IProductService, ProductService&gt;(new InjectionConstructor(typeof(IUserDal&lt;Users&gt;), typeof(IItemDal&lt;Item&gt;), typeof(IRoleDal&lt;Role&gt;), typeof(IBranchDal&lt;Branch&gt;)));
  </code></pre>
  
  <blockquote>
    <blockquote>
      <p>But none of the above types are working.Can anyone know how to register any service class with multiple repository types in Bootstrapper file ?</p>
    </blockquote>
  </blockquote>