ParameterAttribute
This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.
Use this attribute to map input parameters on stored procedure methods.
The ParameterAttribute type exposes the following members:
- DbType - gets or sets the type of the parameter.
- DbName - gets or sets the name of the parameter.
-
Mode - gets or sets the direction of the parameter. The values for this property are predefined in the ParameterModeEnumeration, which exposes the following fields:
- IN - specifies the direction of the parameter to in.
- OUT - specifies the direction of the parameter to out.
- INOUT - specifies the direction of the parameter to in\out.
- Scale - gets or sets the scale of the parameter.
- IsNullable - defines whether the parameter is nullable.
[Function("RetrievePersons")]
public int GetPersons([Parameter("personId", OpenAccessType = OpenAccessType.Int32,
Mode = ParameterMode.InOut, IsNullable = false)] int PersonID)
{
PersonID = PersonID * 2;
return PersonID;
}
<FunctionAttribute("RetrievePersons")>
Public Function GetPersons(<Parameter("personId", OpenAccessType := OpenAccessType.Int32, _
Mode := ParameterMode.InOut, IsNullable := False)> ByVal PersonID As Integer) As Integer
PersonID = PersonID * 2
Return PersonID
End Function