我在我的应用程序中有一个界面(IDomainService)和一个(很多),我用它标记了更多的接口(IProductionLineTitleDuplicationChecker),就像你在其他程序中看到的那样: {
public interface IProductionLineTitleDuplicationChecker : IDomainService ///其实施方式如下:
public class ProductionLineTitleDuplication
如何使用scan扩展注册程序集中的所有接口,而不必在ASP.NET核心2中完全分离?Scan(_ => // Declare which assemblies to scan在巡洋舰: // We start out with all types in the assembly of ITransientService
.FromAssemblyOf&l
(MyController)、A存储库接口的模块项目(MyRepository,实现IMyRepository和IRepository).net核心应用程序引用模块项目var test = typeof(IMyRepository);
此时,一切都如预期的那样运作。但是,这完全违背了自动依赖注册的全部要点。