-
Notifications
You must be signed in to change notification settings - Fork 170
Feature ask: Have ability to ignore query options when EnableQueryAttribute use query options to apply queryable. #826
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
Comments
I'm confused by this ask. If you want to manually handle parts of the query, you'd pass in the Are you asking for a variation of this flow that uses both at the same time or something like that? All in all, this feels really odd to me. |
@julealgon, the EnableQuery provides other benefits which we want to leverage (in face this attribute did too many things).
So I would like to use all of them and have ability to configure the in memory querable which I want to use. Yes I can write a base controller to have a function to do the apply and override EnableQueryAttribute ActionExecuted as no ops. But it will be really nice that EnableQueryAttribute provides the ability to support ignore options. @xuzhg , would like to hear your thoughts also here. |
This to me feels like it should either be a different attribute, or configured some other way.
I've used FluentValidator to validate Though I understand what you are asking here, I don't think keeping
If just
It just seems to me like the proposed solution is not good. I understand the underlying reason for the request, but I'd propose we think more thoroughly about how this would be achieved. |
@julealgon , This proposal is just based on the scenario which I am facing, it may not be idea, if you have any thoughts and idea, how we should acheive this, we can have discussion. |
@julealgon , maybe the request is liking this: Is that possible? |
Assemblies affected
Which assemblies and versions are known to be affected e.g. ASP.NET Core OData 8.x
Describe the bug
@xuzhg , as we discussed, hope we can extend EnableQueryAttribute to support setting ignore query options when apply ODataQueryOptions to queryable during OnActionExecuted since consumer may pass the pagination to underlying backend service and only use in memory filter.
Reproduce steps
The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.
Data Model
Please share your Data model, for example, your C# class.
EDM (CSDL) Model
Please share your Edm model, for example, CSDL file.
You can send
$metadata
to get a CSDL XML content.Request/Response
Please share your request Uri, head or the request body
Please share your response head, body.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Please share your call stack or any error message
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: