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