coolwx.StackExchange.RedisExtension (nuget): StackExchange.Redis扩展,可将对象直接存入Hash,支持模式匹配键列表 写入Hash示例:         /// <summary>         /// 存入货位信息         /// </summary>         /// <returns></returns>         async Task GetStockList()         {             var result = await _webServiceClient.GetStocksListAsync();             string wmsMessage = result.Body.GetStocksListResult;             var entity = MessageToEntity<List<StockInfo>>(wmsMessage, out _, out _);             if (entity == null) return;             foreach (var item in entity)             {                 string redisKey = $"Wms:FullInventory:{item.pcode}";                 await _redisDb2.WxSetHashAsync(redisKey, item);             }         }  读取Hash示例:         /// <summary>         /// 日生产任务信息         /// </summary>         /// <returns></returns>         [HttpGet("platform/product")]         public async Task<ActionResult<R>> PlatformDayProductInfo()         {             string keyPattern = "Wms:DailyProductionTask:*";             List<PlatformDayProduct?>? list = await _redisDb2.WxGetHashListAsync<PlatformDayProduct>(keyPattern);             return R.OK("items", list);         }
Keywords: StackExchange|Redis