Skip to content

adding the ability to build queries in stages #157

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

Merged
merged 1 commit into from
Jul 17, 2022
Merged

Conversation

slorello89
Copy link
Member

@slorello89 slorello89 commented Jul 14, 2022

Addresses #78,

Allows users to build their queries in stages. Previously, Redis OM .NET would only honor the last boolean query passed to it. So if you queried

collection.Where(x=>x.FirstName == "Alice").First(x=>x.Age < 32);

Only all the people younger than 32 would be returned from the collection. With this PR, both queries are cleanly folded together to make one query to Redis.

The methodology for this is that the collection now keeps track of all Expression<Func<T,bool>> passed to it over time, folding them all together into something usable.

@slorello89 slorello89 added the enhancement New feature or request label Jul 14, 2022
@slorello89 slorello89 requested a review from shacharPash July 14, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants