Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

WithPagination - have I can repeat my query? #127

@KSemenenko

Description

@KSemenenko

I have a query like this:

await _postRepository.CosmosStore.Query().Where(w => w.SourceType == SourceType.News)
                        .OrderByDescending(o => o.PublishTime)
                        .WithPagination(1, 50).ToPagedListAsync();

and next I try to get next page:

await _postRepository.CosmosStore.Query().Where(w => w.SourceType == SourceType.News)
                            .OrderByDescending(o => o.PublishTime)
                            .WithPagination(token, 50).ToPagedListAsync();

but if I will remove Where part, I will have empty result.

Is there any way how I can use my token to continue get data without use my original query?
like this:

await _postRepository.CosmosStore.Query()
                            .WithPagination(token, 50).ToPagedListAsync();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions