Leo47SQ 2022-03-01 09:26 采纳率: 0%
浏览 11
已结题

C#属性注入问题~!@

//属性注入
public IExportLocationRepositoryDemo ExportLocationRepository { get; set; }

    protected override IRepository<ExportLocationInfoDemo> Repository => this.ExportLocationRepository;

如代码所示,为什么在类中用属性注入实现了一个接口的注入,还要重写一个父类的方法对这个接口进行返回呢?直接调用不行吗

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 3月9日
    • 创建了问题 3月1日