Support SingleResourceCastNode for unquoted type parameters in BindIsOf and BindCastSingleValue#1511
Merged
WanjohiSammy merged 13 commits intomainfrom Sep 16, 2025
Merged
Conversation
Member
Author
|
/AzurePipelines run |
|
No pipelines are associated with this pull request. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for SingleResourceCastNode in unquoted type parameters for isof and cast functions in OData query binding. The change enables proper handling of unquoted type names in these functions, which were previously only supporting quoted type names through ConstantNode.
Key changes include:
- Updated OData library dependency from 8.2.3 to 8.4.0
- Enhanced
BindIsOfandBindCastSingleValuemethods to handle bothConstantNodeandSingleResourceCastNodetype parameters - Updated test cases to reflect the new behavior where unquoted type parameters no longer throw exceptions
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tool/builder.versions.settings.targets | Updates OData library dependency version range |
| src/Microsoft.AspNetCore.OData/Microsoft.AspNetCore.OData.csproj | Updates OData package references to version 8.4.0 |
| sample/ODataRoutingSample/ODataRoutingSample.csproj | Removes direct OData.Edm package reference |
| src/Microsoft.AspNetCore.OData/Query/Expressions/QueryBinder.SingleValueFunctionCall.cs | Adds SingleResourceCastNode support to BindIsOf and BindCastSingleValue methods |
| src/Microsoft.AspNetCore.OData/Query/Expressions/ExpressionBinderBase.cs | Adds SingleResourceCastNode support to BindIsOf and BindCastSingleValue methods |
| test/Microsoft.AspNetCore.OData.Tests/Query/Validator/FilterQueryValidatorTests.cs | Updates test cases to include both quoted and unquoted type parameter scenarios |
| test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs | Updates test expectations for unquoted type parameters and error messages |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastTests.cs | Adds comprehensive E2E tests for cast and isof functions with both quoted and unquoted type parameters |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastEdmModel.cs | Defines EDM model for E2E tests |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastDataSource.cs | Provides test data for E2E tests |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastDataModel.cs | Defines data models for E2E tests |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastController.cs | Implements controller for E2E tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
gathogojr
reviewed
Sep 10, 2025
gathogojr
reviewed
Sep 10, 2025
src/Microsoft.AspNetCore.OData/Query/Expressions/ExpressionBinderBase.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
src/Microsoft.AspNetCore.OData/Query/Expressions/ExpressionBinderBase.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
src/Microsoft.AspNetCore.OData/Query/Expressions/QueryBinder.SingleValueFunctionCall.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
src/Microsoft.AspNetCore.OData/Query/Expressions/QueryBinder.SingleValueFunctionCall.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastTests.cs
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
gathogojr
reviewed
Sep 10, 2025
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
This was referenced Oct 28, 2025
This was referenced Nov 13, 2025
This was referenced Dec 3, 2025
This was referenced Dec 10, 2025
This was referenced Dec 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the unquoted type parameter in
isofandcastis bind asSingleResourceCastNodeinODLintroduced by PR OData/odata.net#3117, but theBindIsOfandBindCastSingleValuemethods only handleConstantNode.This PR
isofandcastunquoted type paramsisofandcastfunction callsODL PR: OData/odata.net#3117