示例#1
0
 public CacheService(TaxathandDbContext dbContext, IMapper mapper)
 {
     _contextRedis = new RedisConnect();
     _cache        = RedisConnect.Connection.GetDatabase();
     _dbContext    = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     _mapper       = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
示例#2
0
 public CommonService(TaxathandDbContext dbContext, IOptions <AppSettings> appSettings, IMapper mapper,
                      ICacheService <Languages, LanguageDTO> cacheService, IHttpContextAccessor accessor, IUtilityService utilityService)
 {
     _dbContext      = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     _appSettings    = appSettings;
     _mapper         = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _cacheService   = cacheService ?? throw new ArgumentNullException(nameof(cacheService));
     _accessor       = accessor;
     _utilityService = utilityService ?? throw new ArgumentNullException(nameof(utilityService));
 }
示例#3
0
 public CountryService(TaxathandDbContext dbContext, IOptions <AppSettings> appSettings,
                       ICacheService <Images, ImageDTO> imageCacheService, ICacheService <Countries, CountryDTO> countryCacheService,
                       ICommonService commonService)
 {
     _dbContext           = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     _imageCacheService   = imageCacheService ?? throw new ArgumentNullException(nameof(imageCacheService));
     _countryCacheService = countryCacheService ?? throw new ArgumentNullException(nameof(countryCacheService));
     _appSettings         = appSettings;
     _commonService       = commonService ?? throw new ArgumentNullException(nameof(commonService));
 }
示例#4
0
 public ArticleService(TaxathandDbContext dbContext,
                       ICacheService <Images, ImageDTO> imageCacheService, ICacheService <Languages, LanguageDTO> languageCacheService,
                       ICommonService commonService, IUtilityService utilityService, ICountryService countryService, IMapper mapper,
                       IOptions <AppSettings> appSettings)
 {
     _dbContext            = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     _imageCacheService    = imageCacheService ?? throw new ArgumentNullException(nameof(imageCacheService));
     _languageCacheService = languageCacheService ?? throw new ArgumentNullException(nameof(languageCacheService));
     _commonService        = commonService ?? throw new ArgumentNullException(nameof(commonService));
     _utilityService       = utilityService ?? throw new ArgumentNullException(nameof(utilityService));
     _countryService       = countryService ?? throw new ArgumentNullException(nameof(countryService));
     _mapper      = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _appSettings = appSettings;
 }
示例#5
0
 public AddressRepository(IConfiguration configuration, TaxathandDbContext dbContext)
 {
     _dbContext = dbContext;
     //_context = new CosmosDBContext();
     //  CollectionUri = _context.GetCollectionURI(addressCollection);
 }
示例#6
0
 public ImageService(TaxathandDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     _mapper    = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
 public ResourceGroupService(TaxathandDbContext dbContext, ICommonService commonService, IMapper mapper)
 {
     _dbContext     = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     _commonService = commonService ?? throw new ArgumentNullException(nameof(commonService));
     _mapper        = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
示例#8
0
 public CountryGroupService(TaxathandDbContext dbContext, IOptions <AppSettings> appSettings)
 {
     _dbContext   = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     _appSettings = appSettings;
 }