标签:
using (var redisClient = RedisManager.GetClient()) { var user = redisClient.GetTypedClient<User>(); var newUser = new User { Id = user.GetAll().Count, Name = txtName.Text, Job = new Job { Position = txtPosition.Text } }; user.Delete(newUser); }
using (var redisClient = RedisManager.GetClient()) { var user = redisClient.GetTypedClient<User>(); //var newUser = new User //{ // Id = user.GetAll().Count, // Name = txtName.Text, // Job = new Job { Position = txtPosition.Text } //}; //user.Delete(newUser); user.DeleteById(txtRedisId.Text);//txtRedisId.Text中为ID值 }
using (var redisClient = RedisManager.GetClient()) { var user = redisClient.GetTypedClient<User>(); user.DeleteByIds((txtRedisId.Text).ToList());//txtRedisId.Text中为ID值 }
var user = redisClient.GetTypedClient<User>(); user.DeleteAll();//删除全部数据
如需转载,请注明出处,本系列博文示例程序下载地址
http://blog.csdn.net/qiujialongjjj/article/details/17262851
标签:
原文地址:http://www.cnblogs.com/tianciliangen/p/4949406.html