public static ISpecificationBuilder <T> Paginate <T>( this ISpecificationBuilder <T> specificationBuilder, int skip, int take) { specificationBuilder.Skip(skip); specificationBuilder.Take(take); return(specificationBuilder); }
public static ISpecificationBuilder <T> Paginate <T>( this ISpecificationBuilder <T> specificationBuilder, IPagingSpecParams pagingParams) { specificationBuilder.Skip(pagingParams.PageSize * (pagingParams.PageIndex - 1)); specificationBuilder.Take(pagingParams.PageSize); //specificationBuilder.Specification.IsPagingEnabled = true; return(specificationBuilder); }