Ejemplo n.º 1
0
 public Task <EmployeeBaseCollectionResult> GetByArgsAsync(EmployeeArgs?args, PagingArgs?paging)
 {
     return(ManagerInvoker.Current.InvokeAsync(this, async() =>
     {
         ExecutionContext.Current.OperationType = OperationType.Read;
         Cleaner.CleanUp(args);
         args.Validate(nameof(args)).Entity(EmployeeArgsValidator.Default).Run().ThrowOnError();
         return Cleaner.Clean(await _dataService.GetByArgsAsync(args, paging).ConfigureAwait(false));
     }));
 }
Ejemplo n.º 2
0
 public async Task <EmployeeBaseCollectionResult> GetByArgsAsync(EmployeeArgs?args, PagingArgs?paging) => await ManagerInvoker.Current.InvokeAsync(this, async() =>
 {
     Cleaner.CleanUp(args);
     await args.Validate(nameof(args)).Entity().With <IValidator <EmployeeArgs> >().RunAsync(throwOnError: true).ConfigureAwait(false);
     return(Cleaner.Clean(await _dataService.GetByArgsAsync(args, paging).ConfigureAwait(false)));
 }, BusinessInvokerArgs.Read).ConfigureAwait(false);