PageResult.cs 832 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. namespace YBEE.EQM.Core
  4. {
  5. /// <summary>
  6. /// 分页数据结果
  7. /// </summary>
  8. /// <typeparam name="T"></typeparam>
  9. public class PageResult<T>
  10. {
  11. /// <summary>
  12. /// 当前页值
  13. /// </summary>
  14. public int PageIndex { get; set; }
  15. /// <summary>
  16. /// 每页大小
  17. /// </summary>
  18. public int PageSize { get; set; }
  19. /// <summary>
  20. /// 数据总数
  21. /// </summary>
  22. public int TotalCount { get; set; }
  23. /// <summary>
  24. /// 总页数
  25. /// </summary>
  26. public int TotalPage => (int)Math.Ceiling(TotalCount / (double)PageSize);
  27. /// <summary>
  28. /// 数据行
  29. /// </summary>
  30. public ICollection<T> Items { get; set; }
  31. }
  32. }