Skip to content

Paging of query results when using LINQ #41

Open
@pksorensen

Description

@pksorensen

We have a few cases where we are writing QueryExpression due to being able to use the continuation token / page cookie to retrieve the data in batches over more requests.

I am wondering if would make sense to make this around linq also. However i dont expect it to be easy.

I am thinking that we would be able to write set.where(...).select(...).ToPaginatedResult() or something that make sense, that returns a

class PagedResult<T> : IList<T>{

public string ContinuationToken {get;set;}

}

Where is the ContinuationToken is the cookie or some base64 encoded string of the data needed to return the next page?

Then on the second result, the same query can be used.

set.where(...).select(...).ToPaginatedResult(continuationToken)

Which allows me to persist the continuation token between calls and continue until no continuation token is present.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions