次の方法で共有


2.2.1.3 Actions

Applies to the OData 3.0 protocol

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

Actions are represented by using a FunctionImport that:

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

  • Might have IsBindable set to "true".

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

  • Is 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 has the EntitySet attribute set either to an EntitySet name or an EntitySetPathExpression that is specified relative to the EntitySet of the Binding parameter.

  • Does not have an HttpMethod data service annotations attribute.

  • Might 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 can 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".

  • Does not have a declaring EntityContainer that declares another FunctionImport with the same Name. This means that actions are not to have overloads.