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

WithPagination - have I can repeat my query? #127

Open
KSemenenko opened this issue Mar 23, 2020 · 0 comments
Open

WithPagination - have I can repeat my query? #127

KSemenenko opened this issue Mar 23, 2020 · 0 comments

Comments

@KSemenenko
Copy link

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();
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant