You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
boolhasKeyParameter=action.HasODataKeyParameter(entityType,context.Options?.RouteOptions?.EnablePropertyNameCaseInsensitive??false);if(!(context.Singleton!=null^hasKeyParameter)){// Singleton, doesn't allow to query property with key// entityset, doesn't allow for non-key to query propertyreturnfalse;}
However, 'hasKeyParameter' should have 'false' but it has the 'true'.
HasODataKeyParameter has an issue to treat the entity type without key.
The text was updated successfully, but these errors were encountered:
Assemblies affected
Which assemblies and versions are known to be affected e.g. ASP.NET Core OData 8.x
Describe the bug
A clear and concise description of what the bug is.
Reproduce steps
The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.
Data Model
Then we build the Edm model using a singleton as
The controller has the following:
Expected behavior
The conventional routing should identify 'GetCustomers' and build endpoints for it.
Actual behavior
There's no endpoint generated for this action.
Additional context
The root cause is that:
In the NavigationRoutingConvention, there's a logic as below:
https://github.com/OData/AspNetCoreOData/blob/main/src/Microsoft.AspNetCore.OData/Routing/Conventions/NavigationRoutingConvention.cs#L68-L74
However, 'hasKeyParameter' should have 'false' but it has the 'true'.
HasODataKeyParameter
has an issue to treat the entity type without key.The text was updated successfully, but these errors were encountered: