DbExtensions.CreateParameter<T> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用指定的引數建立新的 SQL 參數。
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
類型參數
- T
參數的類型。
參數
- command
- IDbCommand
用來建立 參數的命令。
- direction
- ParameterDirection
參數的方向。
- parameterName
- String
參數名稱。
- value
- T
參數的值。
傳回
使用指定引數建立的參數。