Table of Contents

Struct RelationalCommandParameterObject

Namespace
Microsoft.EntityFrameworkCore.Storage
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

A parameter object for the execution methods on RelationalCommand.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public readonly struct RelationalCommandParameterObject
Inherited Members

Remarks

See Implementation of database providers and extensions for more information and examples.

Constructors

RelationalCommandParameterObject(IRelationalConnection, IReadOnlyDictionary<string, object?>?, IReadOnlyList<ReaderColumn>?, DbContext?, IRelationalCommandDiagnosticsLogger?)

Creates a new parameter object for the given parameters.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public RelationalCommandParameterObject(IRelationalConnection connection, IReadOnlyDictionary<string, object?>? parameterValues, IReadOnlyList<ReaderColumn>? readerColumns, DbContext? context, IRelationalCommandDiagnosticsLogger? logger)

Parameters

connection IRelationalConnection

The connection on which the command will execute.

parameterValues IReadOnlyDictionary<string, object>

The SQL parameter values to use, or null if none.

readerColumns IReadOnlyList<ReaderColumn>

The expected columns if the reader needs to be buffered, or null otherwise.

context DbContext

The current Microsoft.EntityFrameworkCore.DbContext instance, or null if it is not known.

logger IRelationalCommandDiagnosticsLogger

A logger, or null if no logger is available.

RelationalCommandParameterObject(IRelationalConnection, IReadOnlyDictionary<string, object?>?, IReadOnlyList<ReaderColumn>?, DbContext?, IRelationalCommandDiagnosticsLogger?, CommandSource)

Creates a new parameter object for the given parameters.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public RelationalCommandParameterObject(IRelationalConnection connection, IReadOnlyDictionary<string, object?>? parameterValues, IReadOnlyList<ReaderColumn>? readerColumns, DbContext? context, IRelationalCommandDiagnosticsLogger? logger, CommandSource commandSource)

Parameters

connection IRelationalConnection

The connection on which the command will execute.

parameterValues IReadOnlyDictionary<string, object>

The SQL parameter values to use, or null if none.

readerColumns IReadOnlyList<ReaderColumn>

The expected columns if the reader needs to be buffered, or null otherwise.

context DbContext

The current Microsoft.EntityFrameworkCore.DbContext instance, or null if it is not known.

logger IRelationalCommandDiagnosticsLogger

A logger, or null if no logger is available.

commandSource CommandSource

Source of the command.

RelationalCommandParameterObject(IRelationalConnection, IReadOnlyDictionary<string, object?>?, IReadOnlyList<ReaderColumn>?, DbContext?, IRelationalCommandDiagnosticsLogger?, bool)

Creates a new parameter object for the given parameters.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public RelationalCommandParameterObject(IRelationalConnection connection, IReadOnlyDictionary<string, object?>? parameterValues, IReadOnlyList<ReaderColumn>? readerColumns, DbContext? context, IRelationalCommandDiagnosticsLogger? logger, bool detailedErrorsEnabled)

Parameters

connection IRelationalConnection

The connection on which the command will execute.

parameterValues IReadOnlyDictionary<string, object>

The SQL parameter values to use, or null if none.

readerColumns IReadOnlyList<ReaderColumn>

The expected columns if the reader needs to be buffered, or null otherwise.

context DbContext

The current Microsoft.EntityFrameworkCore.DbContext instance, or null if it is not known.

logger IRelationalCommandDiagnosticsLogger

A logger, or null if no logger is available.

detailedErrorsEnabled bool

A value indicating if detailed errors are enabled.

RelationalCommandParameterObject(IRelationalConnection, IReadOnlyDictionary<string, object?>?, IReadOnlyList<ReaderColumn?>?, DbContext?, IRelationalCommandDiagnosticsLogger?, bool, CommandSource)

Creates a new parameter object for the given parameters.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public RelationalCommandParameterObject(IRelationalConnection connection, IReadOnlyDictionary<string, object?>? parameterValues, IReadOnlyList<ReaderColumn?>? readerColumns, DbContext? context, IRelationalCommandDiagnosticsLogger? logger, bool detailedErrorsEnabled, CommandSource commandSource)

Parameters

connection IRelationalConnection

The connection on which the command will execute.

parameterValues IReadOnlyDictionary<string, object>

The SQL parameter values to use, or null if none.

readerColumns IReadOnlyList<ReaderColumn>

The expected columns if the reader needs to be buffered, or null otherwise.

context DbContext

The current Microsoft.EntityFrameworkCore.DbContext instance, or null if it is not known.

logger IRelationalCommandDiagnosticsLogger

A logger, or null if no logger is available.

detailedErrorsEnabled bool

A value indicating if detailed errors are enabled.

commandSource CommandSource

Source of the command.

Properties

CommandSource

Source of the command.

public CommandSource CommandSource { get; }

Property Value

CommandSource

Connection

The connection on which the command will execute.

public IRelationalConnection Connection { get; }

Property Value

IRelationalConnection

Context

The current Microsoft.EntityFrameworkCore.DbContext instance, or null if it is not known.

public DbContext? Context { get; }

Property Value

DbContext

DetailedErrorsEnabled

A value indicating if detailed errors are enabled.

public bool DetailedErrorsEnabled { get; }

Property Value

bool

Logger

A logger, or null if no logger is available.

public IRelationalCommandDiagnosticsLogger? Logger { get; }

Property Value

IRelationalCommandDiagnosticsLogger

ParameterValues

The SQL parameter values to use, or null if none.

public IReadOnlyDictionary<string, object?>? ParameterValues { get; }

Property Value

IReadOnlyDictionary<string, object>

ReaderColumns

The expected columns if the reader needs to be buffered, or null otherwise.

public IReadOnlyList<ReaderColumn?>? ReaderColumns { get; }

Property Value

IReadOnlyList<ReaderColumn>