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

Make this nuget independent from entity framework. #32

Open
miketof opened this issue Dec 1, 2022 · 1 comment
Open

Make this nuget independent from entity framework. #32

miketof opened this issue Dec 1, 2022 · 1 comment

Comments

@miketof
Copy link

miketof commented Dec 1, 2022

Hi!
This nuget is great! I know that it is targetting mostly to entity framework, but small changes can make it independent from EF.
The only place where's used async iqueryable is KeysetPaginationExtensions. If you change line 152:
return context.OrderedQuery.AnyAsync(lambda); to return Task.FromResult(context.OrderedQuery.Any(lambda)); you can get rid of the entity framework reference.
This will allow using of pagination with other ORMs using IQueryable (e.x. MongoDB.Driver). I can push these changes to another branch and make PR if you allow me to.

@mrahhal
Copy link
Owner

mrahhal commented Dec 1, 2022

Hi.
Would have liked that, but since the name of the package itself contains "EntityFrameworkCore" this will be a bit problematic. In addition, I don't like that this means we'll be blocking on async, this isn't acceptable at all. I am willing though to change some of the infrastructure here to be able to produce separate packages (adapters) for different ORMs using the idiomatic approach of that ORM.

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