The error code NoActionFoundForCollection & message are misleading, since we support both action and function now. Could change to NoOperationFoundForCollection.
```
// now look for bindable actions
IEdmAction action = model.FindAction(segment, collectionType);
if (action != null)
{
return new BoundActionPathSegment(action);
}
// Try to match this to a function call
BoundFunctionPathSegment pathSegment = TryMatchBoundFunctionCall(segment, segments, model, bindingType: collectionType);
if (pathSegment != null)
{
return pathSegment;
}
throw new ODataException(Error.Format(SRResources.NoActionFoundForCollection, segment, collectionType.ElementType));
```
An example:
```
Microsoft.OData.Core.ODataException occurred
_HResult=-2146233079
_message=Invalid action detected. 'GetCount' is not an action that can bind to 'Collection([WebStack.QA.Test.OData.BoundOperation.Employee Nullable=False])'.
HResult=-2146233079
IsTransient=false
Message=Invalid action detected. 'GetCount' is not an action that can bind to 'Collection([WebStack.QA.Test.OData.BoundOperation.Employee Nullable=False])'.
Source=System.Web.OData
StackTrace:
at System.Web.OData.Routing.DefaultODataPathHandler.ParseAtEntityCollection(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, String segment, Queue`1 segments)
InnerException:
```
```
// now look for bindable actions
IEdmAction action = model.FindAction(segment, collectionType);
if (action != null)
{
return new BoundActionPathSegment(action);
}
// Try to match this to a function call
BoundFunctionPathSegment pathSegment = TryMatchBoundFunctionCall(segment, segments, model, bindingType: collectionType);
if (pathSegment != null)
{
return pathSegment;
}
throw new ODataException(Error.Format(SRResources.NoActionFoundForCollection, segment, collectionType.ElementType));
```
An example:
```
Microsoft.OData.Core.ODataException occurred
_HResult=-2146233079
_message=Invalid action detected. 'GetCount' is not an action that can bind to 'Collection([WebStack.QA.Test.OData.BoundOperation.Employee Nullable=False])'.
HResult=-2146233079
IsTransient=false
Message=Invalid action detected. 'GetCount' is not an action that can bind to 'Collection([WebStack.QA.Test.OData.BoundOperation.Employee Nullable=False])'.
Source=System.Web.OData
StackTrace:
at System.Web.OData.Routing.DefaultODataPathHandler.ParseAtEntityCollection(IEdmModel model, ODataPathSegment previous, IEdmType previousEdmType, String segment, Queue`1 segments)
InnerException:
```