public static void Set <T>(Tx tx, byte[] key, T dto) { using (var mem = new MemoryStream()) { Serializer.Serialize(mem, dto); tx.Put(key, mem.ToArray()); } }
public static void SetEmpty(Tx tx, byte[] key) { tx.Put(key, EmptyBuffer); }
public static void SetValue(Tx tx, byte[] key, long value) { tx.Put(key, Slice.FromInt64(value).GetBytes()); }