OData / OData/AspNetCoreOData

Composite key drops from routing after calling ODataConventionModelBuilder.EnableLowerCamelCase()

Open
#595 10 comments 4 reactions 2 assignees View on GitHub

@corranrogue9 is already working on this.

Since May 17, 2022.

investigated retriage
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.
image

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

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.