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