1. 程式人生 > >C# Redis實戰(五)

C# Redis實戰(五)

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值
}