public async Task SaveSortCodesAsync(Dictionary <string, string> sortcodes) { foreach (KeyValuePair <string, string> pair in sortcodes) { await RedisDataAccess.SetCacheValueAsync(_cache, pair.Key, pair.Value, TimeSpan.FromSeconds(60), TimeSpan.FromSeconds(60)); } }
public OrdersController(IMapper mapper, IOptions <ConnectionStrings> connectionStrings, IOptions <RedisConnectionStrings> redisConnectionStrings) { _mapper = mapper; _dataAccess = new IdapadDataAccess(connectionStrings.Value.IdapadDb); _dataRedisAccess = new RedisDataAccess(redisConnectionStrings.Value.Redis); }
public BasketController(IOptions <RedisConnectionStrings> connectionStrings, IMapper mapper) { connectionStrings.Value.Redis = "localhost"; _dataAccess = new RedisDataAccess(connectionStrings.Value.Redis); _mapper = mapper; }