Export (0) Print
Expand All Actions

Applies to the OData 3.0 protocol

An action is an operation that MAY be bound to its first parameter. After the action is invoked, the action MAY have a side effect.

Actions are represented by using a FunctionImport that:

  • MUST be marked as IsSideEffecting, either because IsSideEffecting is set to "true" or because IsSideEffecting is omitted and thus defaults to "true".

  • MAY have IsBindable set to "true".

  • MUST have a first parameter with a type that is either an EntityType or a collection of an EntityType if IsBindable is set to "true".

  • MUST be marked as noncomposable, either because IsComposable is set to "false" or because IsComposable is omitted and thus defaults to "false".

  • If the ReturnType of the action is either an EntityType or a collection of an EntityType, the action MUST have the EntitySet attribute set either to an EntitySet name or an EntitySetPathExpression that is specified relative to the EntitySet of the Binding parameter.

  • MUST not have an HttpMethod data service annotations attribute.

  • MAY have an IsAlwaysBindable data service annotation attribute set to either "true" or "false", if IsBindable is set to "true". This attribute indicates whether all instances of the first parameter type (the Binding parameter) can be bound to by the action. This means that servers MAY omit action information when serializing an entry and its applicable actions if the server follows conventions in order to be more efficient. When omitted, the IsAlwaysBindable data service annotations attribute defaults to "false".

  • MUST not have a declaring EntityContainer that declares another FunctionImport with the same Name. This means that actions MUST NOT have overloads.

© 2015 Microsoft