无法从IGenericReporsitoty <Entity>转换为IGenericReporsitoty <EntityBase>

我的控制器出现错误。无法将存储库注入到基本构造函数中

public class MyController : ControllerCRUDBase<Entity, TournamentDto>
{
    public MyController (IGenericRepository<Entity> repository, IMapper mapper) 
        : base(repository, mapper)
    {
    }
}

我的ControllerCRUDBase在哪里:

public abstract class ControllerCRUDBase<E, D> : ControllerBase
        where E : EntityBase
        where D : DtoBase
    {
        protected readonly IGenericRepository<EntityBase> _repository;
        protected readonly IMapper _mapper;

        public ControllerCRUDBase(IGenericRepository<EntityBase> repository,
                                  IMapper mapper)
        {
            _repository = repository;
            _mapper = mapper;
        }

我的IGenericRepository是:

public interface IGenericRepository<TEntity> where TEntity : EntityBase
    {
    }

实体类是:

public class Entity: EntityBase
{
}

错误是这样的:

cannot convert from 'IGenericRepository<Entity>' to 'IGenericRepository<EntityBase>'

我不明白为什么。