Skip to content

Commit 781dd6f

Browse files
committed
The assertion about action overloading was wrong.
1 parent 12664fc commit 781dd6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Templates/CSharp/Model/MethodRequestBody.cs.tt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ var requestBody = entityName + method.Name.Substring(method.Name.IndexOf('.') +
1111
// will always result in POST calls. The OData spec is explicit in saying that overload methods bound
1212
// to other types are explicitly not allowed. Therefore, any overload methods found here are invalid
1313
// and violate the spec.
14-
System.Diagnostics.Debug.Assert(!method.Overloads.Any(), "Overload actions are not allowed in OData services");
14+
// System.Diagnostics.Debug.Assert(!method.Overloads.Any(), "Overload actions are not allowed in OData services");
15+
// Commenting this out as 12.1.1.1, Action Overload Rules, states "Bound actions support overloading (multiple
16+
// actions having the same name within the same namespace) by binding parameter type. The combination of action
17+
// name and the binding parameter type MUST be unique within a namespace."
1518

1619
var attributeStringBuilder = new StringBuilder();
1720
attributeStringBuilder.Append("[JsonObject(MemberSerialization = MemberSerialization.OptIn)]");

0 commit comments

Comments
 (0)