Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip/Take Paging API #149

Closed
mumby0168 opened this issue Dec 16, 2021 · 4 comments
Closed

Skip/Take Paging API #149

mumby0168 opened this issue Dec 16, 2021 · 4 comments

Comments

@mumby0168
Copy link
Collaborator

Paging support using the Skip() Take() approach making use of offsets, which we have discussed and think will have its use cases however, in terms of cosmos DB it can cost a lot of RUs, and it's quite in-efficient. We plan to implement this API with clear documentation that states the implications of using this and where you may want to and where you should certainly not use this API.

See discussions and recent attempts at this API as well as the API which currently supports continuation tokens for a load more paging scenario #142 and this was done as part of issue #53.

The API could look something like this

ValueTask<IPage<TItem>> PageAsync(
            Expression<Func<TItem, bool>> predicate = null,
            int pageNumber = 1,
            int pageSize = 25,
            CancellationToken cancellationToken = default);
@Rabosa616
Copy link
Contributor

I´ve already implemented on my own, do you want me to do a PR to your Repo?

@mumby0168
Copy link
Collaborator Author

I´ve already implemented on my own, do you want me to do a PR to your Repo?

Yeah, that sound's great 😄 be happy to see it.

@Rabosa616
Copy link
Contributor

I've created the PR with the code I have in my solution

@mumby0168
Copy link
Collaborator Author

Great work @Rabosa616 PR merged, will release this shortly #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants