Table of Contents

Interface IRelationalCommandTemplate

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

A command template to populate an IRelationalCommand or create a DbCommand

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

public interface IRelationalCommandTemplate

Remarks

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

Properties

CommandText

Gets the command text to be copied to the destination command.

string CommandText { get; }

Property Value

string

Parameters

Gets the parameters to be copied to the destination command.

IReadOnlyList<IRelationalParameter> Parameters { get; }

Property Value

IReadOnlyList<IRelationalParameter>

Methods

CreateDbCommand(RelationalCommandParameterObject, Guid, DbCommandMethod)

Called by the execute methods to create a DbCommand for the given DbConnection and configure timeouts and transactions.

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

DbCommand CreateDbCommand(RelationalCommandParameterObject parameterObject, Guid commandId, DbCommandMethod commandMethod)

Parameters

parameterObject RelationalCommandParameterObject

Parameters for this method.

commandId Guid

The command correlation ID.

commandMethod DbCommandMethod

The method that will be called on the created command.

Returns

DbCommand

The created command.