title: Registering an open Generic Service erroneously asks me for type arguments
body: <p>I have a Generic Repository which takes a Generic DbContext and a Generic Model, </p>
  
  <p>The Code I have is just a basic Generic Repository like so;</p>
  
  <pre><code>public class DataRepo&lt;T,M&gt; : IDataRepo&lt;T,M&gt; where T:DbContext where M :class
  {
      private readonly T _Context;
      private readonly M _Model;
  
  
      public DataRepo(T Context, M model)
      {
          _Context = Context;
          _Model = model;
      }
      public void Delete()
      {
         _Context.Remove(_Model);
      }
  
      public async Task&lt;IEnumerable&lt;T&gt;&gt; GetAll()
      {
          var results = await _Context.Set&lt;T&gt;().AsQueryable().AsNoTracking().ToListAsync();
  
          return results;
      }
  
      public T GetSingleByID(int ID)
      {
          return _Context.Find&lt;T&gt;(ID);            
      }
  
      public void InsertBulkItems(ICollection&lt;M&gt; dataModels)
      {
          _Context.AddRange(dataModels);
      }
  
      public void InsertSingleItem()
      {
          _Context.Add(_Model);
      }
  
      public void UpdateItem()
      {
          _Context.Update(_Model);
      }
  }
  </code></pre>
  
  <p>when I try to register this Service in Startup.cs, the compiler asks me for type arguments when according to <a href="https://ardalis.com/registering-open-generics-in-aspnet-core-dependency-injection" rel="nofollow noreferrer">this link</a> I shouldn't be getting this error?</p>
  
  <pre><code>services.AddScoped(typeof(IDataRepo&lt;&gt;), typeof(DataRepo&lt;&gt;));
  </code></pre>
  
  <p>The Error I get is this;</p>
  
  <blockquote>
    <p>CS0305    Using the generic type 'IDataRepo' requires 2 type arguments</p>
  </blockquote>
  
  <p>Could someone point me in the right direction with this please?</p>