Freigeben über


2.1.17 FunctionImport Parameter

Functions that are defined in conceptual schema definition language (CSDL) optionally accept both in and out Parameter elements. Each Parameter element MUST have an associated Name and Type defined.

The following is an example of FunctionImport Parameter element.

 <FunctionImport Name="GetScalar" ReturnType="Collection(String)">
   <Parameter Name="count" Type="Int32" Mode="Out" />
   <ValueFunctionImport Anything="bogus1" xmlns="FunctionImportAnnotation"/>
 </FunctionImport>

The following rules apply to the FunctionImport Parameter element:

  • Parameter MUST have a Name defined.

  • The Type of the Parameter MUST be defined. Type is a scalar type, ComplexType, or EntityType or a collection of scalar, ComplexType, or EntityType types.

  • Parameter can define the Mode of the parameter. Possible values are "In", "Out", and "InOut".

  • For a given Parameter, a MaxLength value can be specified.

  • Precision can be specified for a given Parameter.

  • Scale can be specified for a given Parameter.

  • Parameter can contain any number of AnnotationAttribute attributes. The full names of the AnnotationAttribute attributes cannot collide.

  • Parameter can contain a maximum of one Documentation element.

  • Parameter can contain any number of AnnotationElement elements.

  • In CSDL 3.0, Parameter can contain any number of ValueAnnotation elements.

  • Child elements of Parameter are to appear in this sequence: Documentation, AnnotationElement.

Graphic representation in table format of the rules that apply to the Parameter element of a given FunctionImport element.

All child elements are to appear in the order indicated.