Table of Contents

Interface IRelationalCommandBuilder

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

Builds a command to be executed against a relational database.

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

public interface IRelationalCommandBuilder
Extension Methods

Properties

CommandTextLength

Gets the length of the command text.

int CommandTextLength { get; }

Property Value

int

Parameters

The collection of parameters.

IReadOnlyList<IRelationalParameter> Parameters { get; }

Property Value

IReadOnlyList<IRelationalParameter>

TypeMappingSource

The source for RelationalTypeMappings to use.

IRelationalTypeMappingSource TypeMappingSource { get; }

Property Value

IRelationalTypeMappingSource

Methods

AddParameter(IRelationalParameter)

Adds the given parameter to this command.

IRelationalCommandBuilder AddParameter(IRelationalParameter parameter)

Parameters

parameter IRelationalParameter

The parameter.

Returns

IRelationalCommandBuilder

The same builder instance so that multiple calls can be chained.

Append(string)

Appends an object to the command text.

IRelationalCommandBuilder Append(string value)

Parameters

value string

The object to be written.

Returns

IRelationalCommandBuilder

The same builder instance so that multiple calls can be chained.

AppendLine()

Appends a blank line to the command text.

IRelationalCommandBuilder AppendLine()

Returns

IRelationalCommandBuilder

The same builder instance so that multiple calls can be chained.

Build()

Creates the command.

IRelationalCommand Build()

Returns

IRelationalCommand

The newly created command.

DecrementIndent()

Decrements the indent of subsequent lines.

IRelationalCommandBuilder DecrementIndent()

Returns

IRelationalCommandBuilder

The same builder instance so that multiple calls can be chained.

IncrementIndent()

Increments the indent of subsequent lines.

IRelationalCommandBuilder IncrementIndent()

Returns

IRelationalCommandBuilder

The same builder instance so that multiple calls can be chained.