-
Notifications
You must be signed in to change notification settings - Fork 711
Wrong property navigation action is selected in ODATA controllers #336
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
Thanks for reporting it. I'll have a look. |
The same to me. [HttpGet("GetUserInfo"), HttpPost("GetUserInfo")] |
I am witnessing a similar issue with a single controller offering multiple collections.
The above works using the standard ASP.NET Core OData config. I can hit /odata/Foos or /odata/Bars and the appropriate controller method is called as expected. When configured to use ASP.NET Core OData versioning as follows, the first method of the controller is hit for both /v1/Foos and /v1/Bars.
It seems the ODataRoute attribute is ignored with the versioned implementation. |
Thanks a lot for fixing. |
When there are multiple navigation actions in ODATA controller, first one (based on method order in class) is always executed regardless of requested navigation property.
Example (can be verified in ODataBasicSample):
Request:
http://localhost:1238/api/People(1)/LastName?api-version=1.0
Actual response:
Expected response:
The text was updated successfully, but these errors were encountered: