-
Notifications
You must be signed in to change notification settings - Fork 473
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
Allow EnableQueryAttribute
derived classes to specify IgnoreQueryOptions
#2648
base: master
Are you sure you want to change the base?
Conversation
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
@@ -530,8 +535,8 @@ private static void ExtractGroupingProperties(List<string> result, IEnumerable<G | |||
/// query options.</remarks> | |||
public virtual object ApplyTo(object entity, ODataQuerySettings querySettings, AllowedQueryOptions ignoreQueryOptions) | |||
{ | |||
_ignoreQueryOptions = ignoreQueryOptions; | |||
return ApplyTo(entity, new ODataQuerySettings()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this was a bug...
EnableQueryAttribute
derived classes to specify IgnoreQueryOptions
@ificator |
Issues
Allow classes deriving from
EnableQueryAttribute
to passIgnoreQueryOptions
flags toODataQueryOptions
.Description
Deriving from
EnableQueryAttribute
is a supported scenario so thatApplyQuery
can have its implementation tweaked. However, theODataQuerySettings
instance is NOT exposed to derived classes and so it's not possible to pass inignoreQueryOptions
toODataQueryOptions.ApplyTo
. This change allows the value to be directly set onODataQueryOptions
instead of being set viaApplyTo
.Checklist (Uncheck if it is not completed)