i have an interface(IDomainService) and a (lot) like it in my app which i mark more interfaces with it(IProductionLineTitleDuplicationChecker ) like what u will see in the rest:
public interface IDomainService
{
}
public interface IProductionLineTitleDuplicationChecker : IDomainService
{
///
}
and the implementation like this:
public class ProductionLineTitleDuplicationChecker : IProductionLineTitleDuplicationChecker
{
private readonly IProductionLineRepository _productionLineRepository;
public ProductionLineTitleDuplicationChecker(IProductionLineRepository productionLineRepository)
{
_productionLineRepository = productionLineRepository;
}
public bool IsDuplicated(string productionLineTitle)
{
///
}
}
right now im using the built-in DI-container to resolve and register the services but i want to change it and use scrutor instead
how can i resolve and register my Services using scrutor?
You could just leverage the
Scrutorextension methods forMicrosoft.Extensions.DependencyInjection.IServiceCollection. In yourStartup.cs: