RelationalTypeMapping.CreateParameter(DbCommand, String, Object, Nullable<Boolean>) Method

Definition

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

DbParameter

The newly created parameter.

Applies to