コード例 #1
0
        public async Task <PagedResultDto <YaeherUserPayment> > YaeherUserPaymentPage(YaeherUserPaymentIn YaeherUserPaymentInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderBy(a => a.CreatedOn).Where(YaeherUserPaymentInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage             = tasksCount / YaeherUserPaymentInfo.MaxResultCount;
            var YaeherUserPaymentList = await query.PageBy(YaeherUserPaymentInfo.SkipTotal, YaeherUserPaymentInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <YaeherUserPayment>(tasksCount, YaeherUserPaymentList.MapTo <List <YaeherUserPayment> >()));
        }
コード例 #2
0
 /// <summary>
 /// 输出模型
 /// </summary>
 /// <param name="YaeherUserPaymentDto"></param>
 /// <param name="YaeherUserPaymentInfo"></param>
 public YaeherUserPaymentOut(PagedResultDto <YaeherUserPayment> YaeherUserPaymentDto, YaeherUserPaymentIn YaeherUserPaymentInfo)
 {
     Items          = YaeherUserPaymentDto.Items;
     TotalCount     = YaeherUserPaymentDto.TotalCount;
     TotalPage      = YaeherUserPaymentDto.TotalCount / YaeherUserPaymentInfo.MaxResultCount;
     SkipCount      = YaeherUserPaymentInfo.SkipCount;
     MaxResultCount = YaeherUserPaymentInfo.MaxResultCount;
 }
コード例 #3
0
        public async Task <IList <YaeherUserPayment> > YaeherUserPaymentList(YaeherUserPaymentIn YaeherUserPaymentInfo)
        {
            var YaeherUserPayments = await _repository.GetAllListAsync(YaeherUserPaymentInfo.Expression);

            return(YaeherUserPayments.ToList());
        }