Delete data from Redis
using (var redisclient = redismanager.getclient ()) { var user = Redisclient.gettypedclient<user>(); var New User { = user. GetAll (). Count, = txtname.text, new Job {Position = txtposition.text} }; User. Delete (NewUser); }
2 , void Deletebyid (object id), delete data function
using(varRedisclient =redismanager.getclient ()) { varuser = 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);//ID value in Txtredisid.text}
3, void Deletebyids (IEnumerable IDs); Bulk Delete function
using (var redisclient = redismanager.getclient ()) { var user = Redisclient.gettypedclient<user>(); User. Deletebyids ((Txtredisid.text). ToList ()); // ID value in Txtredisid.text }
4 , void DeleteAll (); Delete all data
var user = Redisclient.gettypedclient<user>(); User. DeleteAll (); // Delete all data
Redis Combat (V)