Skip to content

Commit 382f19a

Browse files
Add special handling for OData actions because they map as a single action parameter. Related #697
1 parent 7415d1f commit 382f19a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Common.OData.ApiExplorer/AspNet.OData/Routing/ODataRouteBuilderContext.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,16 @@ static bool IsNavigationPropertyLink( IEdmEntitySet? entitySet, IEdmSingleton? s
283283
static bool HasNoEntityKeysRemaining( IEdmOperation operation, IList<ParameterDescriptor> parameters )
284284
{
285285
var actionParamCount = parameters.Count;
286+
287+
if ( operation.IsAction() )
288+
{
289+
return actionParamCount == 0;
290+
}
291+
else if ( !operation.IsFunction() )
292+
{
293+
return false;
294+
}
295+
286296
var operationParamCount = 0;
287297
var matches = 0;
288298

0 commit comments

Comments
 (0)