Paging is the process of splitting a set of results into pages and reading one page at a time. This is useful for optimizing bandwidth traffic, optimizing hardware usage, or simply because no user can handle huge amounts of data at once.

Safe By Default

The default value of the page size on the client side is 128.


In order to overwrite the default page size use the Take method:

List<FileHeader> results = await session.Query()


Use the Skip method to specify the number of results to skip to be able to get the results from the next pages:

List<FileHeader> results = await session.Query()


The following code retrieves all files; each page contains no more that 10 items:

const int pageSize = 10;
int start = 0;
List<FileHeader> results;

	results = await session.Query()

	start += pageSize;

} while (results.Count == pageSize);