コード例 #1
0
        /// <summary>
        /// 获取Invoice的分页列表信息
        ///</summary>
        /// <param name="input"></param>
        /// <returns></returns>

        public async Task <PagedResultDto <InvoiceListDto> > GetPaged(GetInvoicesInput input)
        {
            var query = _entityRepository.GetAll();
            // TODO:根据传入的参数添加过滤条件


            var count = await query.CountAsync();

            var entityList = await query
                             .OrderBy(input.Sorting).AsNoTracking()
                             .PageBy(input)
                             .ToListAsync();

            // var entityListDtos = ObjectMapper.Map<List<InvoiceListDto>>(entityList);
            var entityListDtos = entityList.MapTo <List <InvoiceListDto> >();

            return(new PagedResultDto <InvoiceListDto>(count, entityListDtos));
        }
コード例 #2
0
 public ActionResult Index(GetInvoicesInput input)
 {
     return(base.View());
 }