In the .NET Framework 4.8 version of the API I'm working on, I could specify the routing to an endpoint as so:
[ODataRoute("/myEndpoint(FirstName={firstName},LastName={lastName})/Data")]
This would accept queries regardless of their named parameter order, so both:
"~odata/myEndpoint(FirstName=John,LastName=Doe)/Data"
Success ✔️
"~odata/myEndpoint(LastName=Doe,FirstName=John)/Data"
Success ✔️
would produce results.
However, now in the .NET 6 version (and oData 8 upgrade), that seems no longer to be the case. So from a route specified by (based on the docs and using the ASP.NET routing parameters):
[HttpGet("/myEndpoint(FirstName={firstName},LastName={lastName})/Data")]
The results would be :
"~odata/myEndpoint(FirstName=John,LastName=Doe)/Data"
- Success ✔️
"~odata/myEndpoint(LastName=Doe,FirstName=John)/Data"
- 404 ❌
Is there a way to configure the oData 8 to be able to map a query to an ednpoint, regardless of the order of its named parameters passed in the URL? Or is it up to me to implement it as a middleware somehow? Would there be anything within the package that could assist me in the process?