protected void UpdateSaga <T>(Guid sagaId, Action <T> update) where T : IContainSagaData { var saga = _sagaPersister.Get <T>(sagaId); Assert.NotNull(saga, "Could not update saga. Saga not found"); update(saga); _sagaPersister.Update(saga); }
protected async Task UpdateSaga <T>(Guid sagaId, Action <T> update) where T : class, IContainSagaData { var saga = await LoadSaga <T>(sagaId).ConfigureAwait(false); Assert.NotNull(saga, "Could not update saga. Saga not found"); update(saga); await _sagaPersister.Update(saga, null, null).ConfigureAwait(false); }