Composite key drops from routing after calling ODataConventionModelBuilder.EnableLowerCamelCase()
@corranrogue9 is already working on this.
Since May 17, 2022.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Assemblies affected
ASP.NET Core OData 8.x
Describe the bug
A clear and concise description of what the bug is.
Reproduce steps
Grab sample from
https://github.com/OData/AspNetCoreOData/tree/main/sample/ODataRoutingSample
and run it without modification. The OData Endpoint Routing Debugger shows People(FirstName={keyFirstName},LastName={keyLastName}) as being a valid route.

In EdmModelBuilder class
https://github.com/OData/AspNetCoreOData/blob/main/sample/ODataRoutingSample/Models/EdmModelBuilder.cs
Add call to builder.EnableLowerCamelCase() in the GetEdmModel() method

Rebuild the app, and the People(FirstName={keyFirstName},LastName={keyLastName}) has dropped off

Data Model
https://github.com/OData/AspNetCoreOData/blob/main/sample/ODataRoutingSample/Models/Person.cs
Expected behavior
I would expect the composite key route to remain after changing to the Camel Case convention
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.