Share via


BindingParameterConfiguration Class

Definition

Represents a BindingParameter. Actions/Functions can have at most one BindingParameter. This parameter has similar semantics to the 'this' keyword in C# extensions methods.

For example given a url that identifies a Movie, if there is an action that has a bindingParameter that is a Movie, you can bind the Action to the url.

i.e. if ~/Movies(1) identifies a Movie, and there exists a Checkout action that has a Movie BindingParameter, you can invoke that Action at this url ~/Movies(1)/Checkout

The BindingParameter type must either be an EntityType or a Collection of EntityTypes.
public class BindingParameterConfiguration : Microsoft.AspNet.OData.Builder.ParameterConfiguration
type BindingParameterConfiguration = class
    inherit ParameterConfiguration
Public Class BindingParameterConfiguration
Inherits ParameterConfiguration
Inheritance
BindingParameterConfiguration

Constructors

BindingParameterConfiguration(String, IEdmTypeConfiguration)

Create a BindingParameterConfiguration

Fields

DefaultBindingParameterName

The default parameter name for an action's binding parameter.

Properties

DefaultValue

Gets or sets a default value for optional parameter.

(Inherited from ParameterConfiguration)
DerivedTypeConstraints

Configuration that lists derived types that are allowed for the property.

(Inherited from ParameterConfiguration)
IsOptional

Gets or sets a value indicating whether this parameter is optional or not.

(Inherited from ParameterConfiguration)
Name

The name of the parameter

(Inherited from ParameterConfiguration)
Nullable

Gets or sets a value indicating whether this parameter is nullable or not.

(Inherited from ParameterConfiguration)
TypeConfiguration

The type of the parameter

(Inherited from ParameterConfiguration)

Methods

HasDefaultValue(String)

Sets the optional value as true, default value as given value.

(Inherited from ParameterConfiguration)
HasDerivedTypeConstraint<TDerivedType>()

Adds TDerivedType to the list of derived type constraints.

(Inherited from ParameterConfiguration)
HasDerivedTypeConstraints(Type[])

Adds subtypes to the list of derived type constraints.

(Inherited from ParameterConfiguration)
Optional()

Sets the optional value as true.

(Inherited from ParameterConfiguration)
Required()

Sets the optional value as false.

(Inherited from ParameterConfiguration)

Applies to