Я обновил интерфейс до
public interface IEfCoreRepository<TContext, TEntity>
where TContext : IEfCoreDbContext
where TEntity : class
и затем зарегистрируйте его следующим образом
services.AddTransient(typeof(IEfCoreRepository<,>), typeof(EfCoreRepository<,>));