public Task DeleteAsync(Guid id) { return(ManagerInvoker.Current.InvokeAsync(this, async() => { ExecutionContext.Current.OperationType = OperationType.Delete; Cleaner.CleanUp(id); id.Validate(nameof(id)).Mandatory().Run().ThrowOnError(); await _dataService.DeleteAsync(id).ConfigureAwait(false); })); }
public async Task DeleteAsync(Guid id) => await ManagerInvoker.Current.InvokeAsync(this, async() => { Cleaner.CleanUp(id); await id.Validate(nameof(id)).Mandatory().RunAsync(throwOnError: true).ConfigureAwait(false); await _dataService.DeleteAsync(id).ConfigureAwait(false); }, BusinessInvokerArgs.Delete).ConfigureAwait(false);