public async Task <PagedResultOutput <TaxRuleListDto> > GetTaxRules(GetTaxRulesInput input) { IQueryable <TaxRule> all = this._taxRuleRepository.GetAll(); IQueryable <TaxRule> taxRules = all.WhereIf <TaxRule>(!input.Filter.IsNullOrEmpty(), (TaxRule p) => p.Name.Contains(input.Filter) || p.Caption.Contains(input.Filter)); int num = await taxRules.CountAsync <TaxRule>(); List <TaxRule> listAsync = await taxRules.OrderBy <TaxRule>(input.Sorting, new object[0]).PageBy <TaxRule>(input).ToListAsync <TaxRule>(); return(new PagedResultOutput <TaxRuleListDto>(num, listAsync.MapTo <List <TaxRuleListDto> >())); }
public ActionResult Index(GetTaxRulesInput input) { return(base.View()); }