In CSDL protocol 12.1.1.1:
Bound actions support overloading (multiple actions having the same name within the same namespace) by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a namespace.
But in reality it is able to add overloads of an action with the same name and binding type:
// Action bound to a collection of base EntityType
entityTypeConfigurationOfEmployee.Collection.Action("IncreaseSalary")
.ReturnsCollectionFromEntitySet(entitySetConfiguration);
// Overload
entityTypeConfigurationOfEmployee.Collection.Action("IncreaseSalary")
.ReturnsCollectionFromEntitySet(entitySetConfiguration)
.Parameter<string>("Name");
And the result is:
<Action Name="IncreaseSalary" IsBound="true" m:IsAlwaysBindable="true">
<Parameter Name="bindingParameter" Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
<ReturnType Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
</Action>
<Action Name="IncreaseSalary" IsBound="true" m:IsAlwaysBindable="true">
<Parameter Name="bindingParameter" Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
<Parameter Name="Name" Type="Edm.String" FixedLength="false" Unicode="false" />
<ReturnType Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
</Action>
Actually it should report error for the overload.
Bound actions support overloading (multiple actions having the same name within the same namespace) by binding parameter type. The combination of action name and the binding parameter type MUST be unique within a namespace.
But in reality it is able to add overloads of an action with the same name and binding type:
// Action bound to a collection of base EntityType
entityTypeConfigurationOfEmployee.Collection.Action("IncreaseSalary")
.ReturnsCollectionFromEntitySet(entitySetConfiguration);
// Overload
entityTypeConfigurationOfEmployee.Collection.Action("IncreaseSalary")
.ReturnsCollectionFromEntitySet(entitySetConfiguration)
.Parameter<string>("Name");
And the result is:
<Action Name="IncreaseSalary" IsBound="true" m:IsAlwaysBindable="true">
<Parameter Name="bindingParameter" Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
<ReturnType Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
</Action>
<Action Name="IncreaseSalary" IsBound="true" m:IsAlwaysBindable="true">
<Parameter Name="bindingParameter" Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
<Parameter Name="Name" Type="Edm.String" FixedLength="false" Unicode="false" />
<ReturnType Type="Collection(WebStack.QA.Test.OData.BoundOperation.Employee)" />
</Action>
Actually it should report error for the overload.