コード例 #1
0
 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));
     }
 }
コード例 #2
0
ファイル: OrdersController.cs プロジェクト: bmenachery/Idapad
 public OrdersController(IMapper mapper, IOptions <ConnectionStrings> connectionStrings, IOptions <RedisConnectionStrings> redisConnectionStrings)
 {
     _mapper          = mapper;
     _dataAccess      = new IdapadDataAccess(connectionStrings.Value.IdapadDb);
     _dataRedisAccess = new RedisDataAccess(redisConnectionStrings.Value.Redis);
 }
コード例 #3
0
ファイル: BasketController.cs プロジェクト: bmenachery/Idapad
 public BasketController(IOptions <RedisConnectionStrings> connectionStrings, IMapper mapper)
 {
     connectionStrings.Value.Redis = "localhost";
     _dataAccess = new RedisDataAccess(connectionStrings.Value.Redis);
     _mapper     = mapper;
 }