using HealthMonitor.Util.QueryObjects; namespace HealthMonitor.Core.Query.Extensions { public static class PagerExt { public static IQueryable Pager(this IQueryable query, Paging paging) { paging.TotalCount = query.Count(); return query.Skip((paging.CurPage - 1) * paging.PageSize).Take(paging.PageSize); } } }