title: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type
body: <p>I have read many questions about this problem on SO but I could not figure out what is the issue with my implementation.</p>
  
  <p>I am getting following exception:</p>
  
  <blockquote>
    <p>None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'SampleAuthTemplate.Domain.Entities.Core.Repositories.Concrete.EntityRepository`1[SampleAuthTemplate.Domain.Entities.Order]' can be invoked with the available services and parameters:
    ↵Cannot resolve parameter 'SampleAuthTemplate.Domain.Entities.Core.EntitiesContext entitiesContext' of constructor 'Void .ctor(SampleAuthTemplate.Domain.Entities.Core.EntitiesContext)'."</p>
  </blockquote>
  
  <p>Following is the AutoFac registrations:</p>
  
  <pre><code>private static IContainer RegisterServices(ContainerBuilder builder)
          {
              builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
              // registration goes here
              builder.RegisterType&lt;EntitiesContext&gt;().As&lt;IdentityDbContext&lt;ApplicationUser&gt;&gt;().InstancePerApiRequest();
              builder.RegisterGeneric(typeof(EntityRepository&lt;&gt;)).As(typeof(IEntityRepository&lt;&gt;)).InstancePerApiRequest();
              //builder.RegisterGeneric(typeof(AuthRepository&lt;&gt;)).As(typeof(IAuthRepository&lt;&gt;)).InstancePerApiRequest();
  
              builder.RegisterType&lt;AuthRepository&gt;().As&lt;IAuthRepository&gt;().InstancePerApiRequest();
  
              builder.RegisterType&lt;OrderService&gt;().As&lt;IOrderService&gt;().InstancePerApiRequest();
              return builder.Build();
          }
  </code></pre>
  
  <p>and EntitiesContext class:</p>
  
  <pre><code>public class EntitiesContext : IdentityDbContext&lt;ApplicationUser&gt;
      {
          public EntitiesContext(): base("SampleApp")
          {
          }
  
          public IDbSet&lt;Order&gt; Orders {get;set;}
          public IDbSet&lt;OrderDetail&gt; OrderDetails { get; set; }
      }
  </code></pre>
  
  <p>Please guide me.</p>
  
  <p>Thank you.</p>