您的位置:首页 > 数据库 > Redis

ServiceStack.Redis操作Hash

2014-11-21 16:03 330 查看

原文地址:http://www.360doc.com/content/14/0704/13/15643_391950317.shtml

  static void HashTypeDemo(RedisClient redisClient)

        {
            redisClient.SetEntryInHash("user", "userinfo", "cool boy");
            redisClient.SetEntryInHash("user", "useraccount", "5000");

            List<string> keyList = redisClient.GetHashKeys("user");

            foreach (string key in keyList)
            {
                Console.WriteLine(key);
                string value = redisClient.GetValueFromHash("user", key);
                Console.WriteLine("user:{0}:{1}", key, value);
            }
        }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  redis