예제 #1
0
        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> >()));
        }
예제 #2
0
 public ActionResult Index(GetTaxRulesInput input)
 {
     return(base.View());
 }