var input=new input();

var personList= new List<Person>(); //一个查询集合
var Total = personList.Count(s => s.AcceptStatus == input.AcceptStatus);  //总记录数

//分页
var pagerList = personList.Where(s => s.AcceptStatus == input.AcceptStatus).OrderByDescending(s => s.CreateTime)

               .Skip((input.PageIndex-1)*input.PageSize).Take(input.PageSize).ToList();

 

//说明

Skip()方法先忽略根据页面的大小和实际的页数计算出的项数,
再使用方法Take()根据页面的大小提取一定数量的项

 

相关文章:

  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-06-10
  • 2021-11-26
猜你喜欢
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2021-08-05
相关资源
相似解决方案