public SecurityService(IServiceProvider serviceProvider, IOptions <AppSettings> appSettings) { _corporateRepository = (CorporateUnitOfWork)serviceProvider.GetRequiredService(typeof(IUnitOfWork)); _appSettings = appSettings.Value; }
public BaseService(IServiceProvider serviceProvider, string cacheKey) { _corporateRepository = (CorporateUnitOfWork)serviceProvider.GetRequiredService(typeof(IUnitOfWork)); _cache = (IMemoryCache)serviceProvider.GetRequiredService(typeof(IMemoryCache)); _cacheKey = cacheKey; }