首页 > 其他 > 详细

Redis Set操作

时间:2015-08-28 15:33:55      阅读:103      评论:0      收藏:0      [点我收藏+]

 

     public void CleanPur()
        {
            var typedClient = _redisClient.As<PurClass>();
            typedClient.DeleteAll();
        }

        public void RemovePur(string u_dataid,string u_purno)
        {
            var typedClient = _redisClient.As<PurClass>();
            typedClient.Delete(typedClient.GetAll().Where(p => p.u_dataid == u_dataid)
                .Where(p => p.u_purno == u_purno).First());
        }

        public void StorePur(PurClass customer)
        {
            var typedClient = _redisClient.As<PurClass>();
            typedClient.Store(customer);
        }

        public IList<PurClass> AllPur()
        {
            var typedClient = _redisClient.As<PurClass>();
            return typedClient.GetAll();
        }

        public IList<PurClass> Pur(string u_dataid,string u_purno)
        {
            var typedClient = _redisClient.As<PurClass>();
            return typedClient.GetAll().Where(p => p.u_dataid == u_dataid)
                .Where(p => p.u_purno.StartsWith(u_purno.Substring(0, 4))).ToList(); 
        }

 

Redis Set操作

原文:http://www.cnblogs.com/CoreXin/p/4766448.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!