mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
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.
20 lines
716 B
20 lines
716 B
using JetBrains.Annotations;
|
|
using Volo.Abp;
|
|
using Volo.Abp.Application.Dtos;
|
|
|
|
namespace System.Linq;
|
|
|
|
public static class AbpPagingQueryableExtensions
|
|
{
|
|
/// <summary>
|
|
/// Used for paging with an <see cref="IPagedResultRequest"/> object.
|
|
/// </summary>
|
|
/// <param name="query">Queryable to apply paging</param>
|
|
/// <param name="pagedResultRequest">An object implements <see cref="IPagedResultRequest"/> interface</param>
|
|
public static IQueryable<T> PageBy<T>([NotNull] this IQueryable<T> query, IPagedResultRequest pagedResultRequest)
|
|
{
|
|
Check.NotNull(query, nameof(query));
|
|
|
|
return query.PageBy(pagedResultRequest.SkipCount, pagedResultRequest.MaxResultCount);
|
|
}
|
|
}
|
|
|