Exemplo n.º 1
0
 public Task <TripPerson?> GetAsync(string?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));
     }));
 }
Exemplo n.º 2
0
 public async Task <TripPerson?> GetAsync(string?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);