-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add support for the specification pattern in pageAsync #359
Comments
Hi @d1820 can you provide an example query you'd like to make? The specification pattern can be used along with paging, by deriving from a different specification base type. There is some examples here, and you can also extend these base classes to add extra functionality and use multiple .Where clauses. If this isn't what you meant feel free to share an example and I can try and assist: |
thanks for the response. no I don't have a specific example after digging
through the source code I saw how you are applying different types of
specification patterns to the query method. I guess I was just looking at
it from the perspective of if I'm calling pagingAsync having an explicit
overload where I can pass in the specification pattern already tailored to
that base type just makes it a lot cleaner and easier for the user to
reason about usage. The online documentation barely scratches the surface
on the specification pattern.
now that I see how the source code works it's not really that big a deal
would be more of a convenience feature really.
This may have been sent with voice to text, so I apologize for any
misspellings or incorrect wording
…On Wed, Nov 8, 2023, 8:14 AM Billy Mumby ***@***.***> wrote:
Hi @d1820 <https://github.com/d1820> can you provide an example query
you'd like to make? The specification pattern can be used along with
paging, by deriving from a different specification base type. There is some
examples here, and you can also extend these base classes to add extra
functionality and use multiple .Where clauses. If this isn't what you meant
feel free to share an example and I can try and assist:
https://github.com/IEvangelist/azure-cosmos-dotnet-repository/blob/7430997c2d62ce9f6e0c26f124ca16bc4cd5d56a/samples/Microsoft.Azure.CosmosRepository/Specification/SpecificationPagingSamples.cs#L18C5-L61C6
—
Reply to this email directly, view it on GitHub
<#359 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC4GH46EDTKDV3XCVTKRDDYDOOUFAVCNFSM6AAAAAA6SCXVSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBSGA4TCNRQHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
There currently is no way to provide a complex expression easily (without writing and joining expression trees together to create an expression based on multiple query criteria, or to provide an orderBy that is almost always used in filtered paging scenarios. The specification pattern would allow for this.
Describe the solution you'd like
Add an overload to the PageAsync to take in a specification
Describe alternatives you've considered
Writing my own dynamic expression tree parser to join together an outer expression for dynamic search properties ( a search class where all non null properties need to be supplied)
The text was updated successfully, but these errors were encountered: