public FilterProduct SetPaging(BasePaging paging) { this.PageId = paging.PageId; this.PageCount = paging.PageCount; this.StartPage = paging.StartPage; this.EndPage = paging.EndPage; this.TakeEntity = paging.TakeEntity; this.SkipEntity = paging.SkipEntity; this.ActivePage = paging.ActivePage; return(this); }
public static IQueryable <T> Paging <T>(this IQueryable <T> queryable, BasePaging pager) { return(queryable.Skip(pager.SkipEntity).Take(pager.TakeEntity)); }