DbExtensions.CreateParameter<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new SQL parameter using the given arguments.
public static System.Data.IDbDataParameter CreateParameter<T> (this System.Data.IDbCommand command, System.Data.ParameterDirection direction, string parameterName, T value, int? size = default, System.Data.DbType? dbType = default);
static member CreateParameter : System.Data.IDbCommand * System.Data.ParameterDirection * string * 'T * Nullable<int> * Nullable<System.Data.DbType> -> System.Data.IDbDataParameter
<Extension()>
Public Function CreateParameter(Of T) (command As IDbCommand, direction As ParameterDirection, parameterName As String, value As T, Optional size As Nullable(Of Integer) = Nothing, Optional dbType As Nullable(Of DbType) = Nothing) As IDbDataParameter
Type Parameters
- T
The type of the parameter.
Parameters
- command
- IDbCommand
The command to use to create the parameter.
- direction
- ParameterDirection
The direction of the parameter.
- parameterName
- String
The name of the parameter.
- value
- T
The value of the parameter.
Returns
A parameter created using the given arguments.