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)); })); }
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);