RegulusRedis is a redis client for C#.
It is based on StackExchange.Redis
The main technology is that when the object is stored in database to be split into individual Hash.
Library Link : https://www.nuget.org/packages/RegulusRedis/
// StackExchange.Redis initial.
var redis = ConnectionMultiplexer.Connect("localhost:6379");
var client = new Regulus.Database.Redis.Client(redis.GetDatabase(), new JsonSeriallzer());
var testObject = new TestObject();//The class is your custom.
var id = 1;
testObject.Id = id;
testObject.Value = 1345;
client.Add(testObject);
var testObjects = client.Find<TestObject>(t=> t.Id == 1);
var testObject2 = new TestObject();//The class is your custom.
testObject2.Id = 1;
testObject2.Value = 999;
var updatedCount = client.Update(t=> t.Id == id, testObject2);
var updatedCount = client.UpdateField<TestObject , int>(t=> t.Id == 1, t=> t.Value , 12345);
var deletedCount = client.Delete<TestObject>(t => t.Id == 1);
// create
var mapper = new Regulus.Database.Redis.Mapper<TestObject>(client, obj => obj.Id == 1);
// update field
mapper.Update<int>(obj => obj.Value, 99);
// get field
var result = mapper.Get<int>(obj => obj.Value);