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

Cherry-pick (a77ed76): Fix AutoExpand Issues with Capitalized $Expand System Query Options #1309

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

WanjohiSammy
Copy link
Contributor

Description

Cherry-pick a77ed76

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Test case modified
  • Build and test with one-click build and test script passed

…1292)

* Fix AutoExpand Issues with Capitalized $Expand System Query Options (#1292)
@@ -869,7 +869,7 @@ internal void AddAutoSelectExpandProperties()

private IDictionary<string, string> GetODataQueryParameters()
{
Dictionary<string, string> result = new Dictionary<string, string>();
Dictionary<string, string> result = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is case-insensitivity always supported, or does the user need to toggle some option?

Copy link
Contributor Author

@WanjohiSammy WanjohiSammy Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@habbes EnableCaseInsensitive is by default true:
IServiceProvider BuildRouteContainer(..)

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.AddRouteComponents(..) will call BuildRouteContainer(..) to build service provider with IEdmModel and service collections.

ODataOptions AddRouteComponents(..)

builder.Services.AddControllers().AddOData(
    opt => opt.Count().Filter().Expand().Select().OrderBy().SetMaxTop(5).AddRouteComponents("odata",EdmModelBuilder.GetEdmModel()));

@WanjohiSammy WanjohiSammy merged commit 8ba84ea into main Oct 25, 2024
4 checks passed
@WanjohiSammy WanjohiSammy deleted the fix/cherry-pick-a77ed76 branch November 13, 2024 13:22
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

Successfully merging this pull request may close these issues.

3 participants