Exemple #1
0
        public static ISpecificationBuilder <T> Paginate <T>(
            this ISpecificationBuilder <T> specificationBuilder,
            int skip,
            int take)
        {
            specificationBuilder.Skip(skip);
            specificationBuilder.Take(take);

            return(specificationBuilder);
        }
Exemple #2
0
        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);
        }