您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

14 行
384B

  1. using HealthMonitor.Util.QueryObjects;
  2. namespace HealthMonitor.Core.Query.Extensions
  3. {
  4. public static class PagerExt
  5. {
  6. public static IQueryable<T> Pager<T>(this IQueryable<T> query, Paging paging)
  7. {
  8. paging.TotalCount = query.Count();
  9. return query.Skip((paging.CurPage - 1) * paging.PageSize).Take(paging.PageSize);
  10. }
  11. }
  12. }