Task Put(TSaga instance) { return(_database.StringSetAsync(_options.FormatSagaKey(instance.CorrelationId), SagaSerializer.Serialize(instance), _options.Expiry)); }
public async Task <TSaga> Get(Guid correlationId) { var value = await _database.StringGetAsync(_options.FormatSagaKey(correlationId)).ConfigureAwait(false); return(value.IsNullOrEmpty ? null : SagaSerializer.Deserialize <TSaga>(value)); }