public Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging)
 {
     return(ManagerInvoker.Current.InvokeAsync(this, async() =>
     {
         ExecutionContext.Current.OperationType = OperationType.Read;
         Cleaner.CleanUp(args);
         args.Validate(nameof(args)).Entity(AccountArgsValidator.Default).Run().ThrowOnError();
         return Cleaner.Clean(await _dataService.GetAccountsAsync(args, paging).ConfigureAwait(false));
     }));
 }
Beispiel #2
0
 public async Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) => await ManagerInvoker.Current.InvokeAsync(this, async() =>
 {
     Cleaner.CleanUp(args);
     await args.Validate(nameof(args)).Entity().With <IValidator <AccountArgs> >().RunAsync(throwOnError: true).ConfigureAwait(false);
     return(Cleaner.Clean(await _dataService.GetAccountsAsync(args, paging).ConfigureAwait(false)));
 }, BusinessInvokerArgs.Read).ConfigureAwait(false);