public async Task ExecuteAsync(T businessObject, Func <Task> doDataPortalCall) { using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { await _saveHandler.ExecuteAsync(businessObject, doDataPortalCall).ConfigureAwait(false); ts.Complete(); } }
public async Task ExecuteAsync(T businessObject, Func <Task> doDataPortalCall) { await _saveHandler.ExecuteAsync(businessObject, doDataPortalCall).ConfigureAwait(false); var broker = new MessageBroker(); broker.Publish(new Saved <T> { BusinessObject = businessObject }); }