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