Exemplo n.º 1
0
 public Task <AccountDetail?> GetDetailAsync(string?accountId)
 {
     return(ManagerInvoker.Current.InvokeAsync(this, async() =>
     {
         ExecutionContext.Current.OperationType = OperationType.Read;
         Cleaner.CleanUp(accountId);
         accountId.Validate(nameof(accountId)).Mandatory().Run().ThrowOnError();
         return Cleaner.Clean(await _dataService.GetDetailAsync(accountId).ConfigureAwait(false));
     }));
 }
Exemplo n.º 2
0
 public async Task <AccountDetail?> GetDetailAsync(string?accountId) => await ManagerInvoker.Current.InvokeAsync(this, async() =>
 {
     Cleaner.CleanUp(accountId);
     await accountId.Validate(nameof(accountId)).Mandatory().RunAsync(throwOnError: true).ConfigureAwait(false);
     return(Cleaner.Clean(await _dataService.GetDetailAsync(accountId).ConfigureAwait(false)));
 }, BusinessInvokerArgs.Read).ConfigureAwait(false);