title: Autofac DI, type not assignable to service
body: <p>I simply cannot figure this out. Using Autofac with .Net core 2.0 and trying to resolve some simple dependencies. Feel like I've tried everything so my current code doesn't reflect everything I've tried.</p>
  
  <p>Here is one of the exceptions I'm getting from Autofac</p>
  
  <blockquote>
    <p>None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 
    'Elucidate.Core.Application.ValuesController' can be invoked with the available services and parameters: Cannot resolve parameter 'Elucidate.Core.Data.Repository.IRepository'1[Elucidate.Core.Model.User.IUser]rep' of constructor 'Void .ctor(Elucidate.Core.Data.Repository.IRepository`</p>
  </blockquote>
  
  <p>Here is where I'm trying to get the dependency injected</p>
  
  <pre><code>public ValuesController(IRepository&lt;IUser&gt; rep)
  </code></pre>
  
  <p>Here is how I'm registering the types in an autofac module </p>
  
  <pre><code>builder.RegisterType&lt;User&gt;().As&lt;IUser&gt;();
  builder.RegisterType&lt;CoreUserStore&lt;User&gt;&gt;();
  
  builder.RegisterType(typeof(Repository&lt;User&gt;)).As&lt;Repository&lt;IUser&gt;&gt;();
  builder.RegisterType&lt;EntityFrameworkModelContext&lt;User&gt;&gt;(); //.As&lt;IModelContext&gt;();
  </code></pre>
  
  <p>What am I doing wrong? I'm new to autofac, used to Unity which seems to be extinct.</p>