I got this error:
ArgumentException: The number of generic arguments provided doesn't equal the arity of the generic type definition. Parameter name: instantiation
public class EfCoreRepository<TContext, TEntity> : IEfCoreRepository<TEntity>
where TContext : IEfCoreDbContext
where TEntity : class
{
....
}
Here is the interface
public interface IEfCoreRepository<TEntity> where TEntity : class
where I register it like that
services.AddTransient(typeof(IEfCoreRepository<>), typeof(EfCoreRepository<,>));