CollectionExtensions.AsPagedList Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

AsPagedList(IEnumerable, QueryOptions, long?)

Extension method to make it easier to create a PagedList.

public static PagedList<T> AsPagedList<T>(this IEnumerable<T> source, QueryOptions opts, long? total)

Parameters

source
System.Collections.Generic.IEnumerable<>

The collection of items to initialize the paged list with.

opts
QueryOptions

Options such as top, skip etc.

total
long?

The total number of items (used to determine number of pages etc.)

Returns

Weavy.Core.Collections.PagedList<>