RelationalTypeMapping.CreateParameter Method

Definition

Overloads

CreateParameter(DbCommand, String, Object, Nullable<Boolean>)

Creates a DbParameter with the appropriate type information configured.

CreateParameter(DbCommand, String, Object, Nullable<Boolean>, ParameterDirection)

Creates a DbParameter with the appropriate type information configured.

CreateParameter(DbCommand, String, Object, Nullable<Boolean>)

Creates a DbParameter with the appropriate type information configured.

public virtual System.Data.Common.DbParameter CreateParameter (System.Data.Common.DbCommand command, string name, object value, bool? nullable = default);
public virtual System.Data.Common.DbParameter CreateParameter (System.Data.Common.DbCommand command, string name, object? value, bool? nullable = default);
abstract member CreateParameter : System.Data.Common.DbCommand * string * obj * Nullable<bool> -> System.Data.Common.DbParameter
override this.CreateParameter : System.Data.Common.DbCommand * string * obj * Nullable<bool> -> System.Data.Common.DbParameter
Public Overridable Function CreateParameter (command As DbCommand, name As String, value As Object, Optional nullable As Nullable(Of Boolean) = Nothing) As DbParameter

Parameters

command
DbCommand

The command the parameter should be created on.

name
String

The name of the parameter.

value
Object

The value to be assigned to the parameter.

nullable
Nullable<Boolean>

A value indicating whether the parameter should be a nullable type.

Returns

The newly created parameter.

Applies to

CreateParameter(DbCommand, String, Object, Nullable<Boolean>, ParameterDirection)

Creates a DbParameter with the appropriate type information configured.

public virtual System.Data.Common.DbParameter CreateParameter (System.Data.Common.DbCommand command, string name, object? value, bool? nullable = default, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input);
abstract member CreateParameter : System.Data.Common.DbCommand * string * obj * Nullable<bool> * System.Data.ParameterDirection -> System.Data.Common.DbParameter
override this.CreateParameter : System.Data.Common.DbCommand * string * obj * Nullable<bool> * System.Data.ParameterDirection -> System.Data.Common.DbParameter
Public Overridable Function CreateParameter (command As DbCommand, name As String, value As Object, Optional nullable As Nullable(Of Boolean) = Nothing, Optional direction As ParameterDirection = System.Data.ParameterDirection.Input) As DbParameter

Parameters

command
DbCommand

The command the parameter should be created on.

name
String

The name of the parameter.

value
Object

The value to be assigned to the parameter.

nullable
Nullable<Boolean>

A value indicating whether the parameter should be a nullable type.

direction
ParameterDirection

The direction of the parameter.

Returns

The newly created parameter.

Applies to