You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 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);
- }
- }
- }
|