You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redis transaction interface provides useful overloads that let you Queue-up any [IRedisTypedClient] operation within a single transaction.
The API provides support for a callback so you also have access to any return values returned as part of the transaction as well.
Usage
Below is a simple example showing how to access, use and commit the transaction.
var typedClient = Redis.GetTypedClient<MyPocoType>();
using (var trans = typedClient.CreateTransaction())
{
trans.QueueCommand(r => r.Set("nosqldbs", new MyPocoType {Id = 1, Name = "Redis"));
trans.Commit();
}
For a transaction that operates on string values see [IRedisTransaction].