Delen via


Parameter Element (SSDL)

The Parameter element in store schema definition language (SSDL) is a child of the Function element that specifies parameters for a stored procedure in the database.

The Parameter element can have the following child elements (in the order listed):

Applicable Attributes

The table below describes the attributes that can be applied to the Parameter element.

Attribute Name Is Required Value

Name

Yes

The name of the parameter.

Type

Yes

The parameter type.

Mode

No

In, Out, or InOut depending on whether the parameter is an input, output, or input/output parameter.

MaxLength

No

The maximum length of the parameter.

Precision

No

The precision of the parameter.

Scale

No

The scale of the parameter.

Note

Any number of annotation attributes (custom XML attributes) may be applied to the Parameter element. However, custom attributes may not belong to any XML namespace that is reserved for SSDL. The fully-qualified names for any two custom attributes cannot be the same.

Example

The following example shows a Function element that has two Parameter elements that specify input parameters:

<Function Name="UpdateOrderQuantity" 
          Aggregate="false" 
          BuiltIn="false" 
          NiladicFunction="false" 
          IsComposable="false" 
          ParameterTypeSemantics="AllowImplicitConversion" 
          Schema="dbo">
  <Parameter Name="orderId" Type="int" Mode="In" />
  <Parameter Name="newQuantity" Type="int" Mode="In" />
</Function>

See Also

Concepts

Entity Framework Overview
SSDL Specification
CommandText Element (SSDL)

Other Resources

CSDL, SSDL, and MSL Specifications
ADO.NET Entity Data Model Tools