Class RelationalCommandBuilder
- 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 class RelationalCommandBuilder : IRelationalCommandBuilder
- Inheritance
-
RelationalCommandBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
RelationalCommandBuilder(RelationalCommandBuilderDependencies)
Constructs a new RelationalCommand.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public RelationalCommandBuilder(RelationalCommandBuilderDependencies dependencies)
Parameters
dependencies
RelationalCommandBuilderDependenciesParameter object containing dependencies for this service.
Properties
CommandTextLength
Gets the length of the command text.
public virtual int CommandTextLength { get; }
Property Value
Dependencies
Dependencies for this service.
public virtual RelationalCommandBuilderDependencies Dependencies { get; }
Property Value
Parameters
The collection of parameters.
public virtual IReadOnlyList<IRelationalParameter> Parameters { get; }
Property Value
TypeMappingSource
The source for RelationalTypeMappings to use.
public virtual IRelationalTypeMappingSource TypeMappingSource { get; }
Property Value
Methods
AddParameter(IRelationalParameter)
Adds the given parameter to this command.
public virtual IRelationalCommandBuilder AddParameter(IRelationalParameter parameter)
Parameters
parameter
IRelationalParameterThe parameter.
Returns
- IRelationalCommandBuilder
The same builder instance so that multiple calls can be chained.
Append(string)
Appends an object to the command text.
public virtual IRelationalCommandBuilder Append(string value)
Parameters
value
stringThe 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.
public virtual IRelationalCommandBuilder AppendLine()
Returns
- IRelationalCommandBuilder
The same builder instance so that multiple calls can be chained.
Build()
Creates the command.
public virtual IRelationalCommand Build()
Returns
- IRelationalCommand
The newly created command.
DecrementIndent()
Decrements the indent of subsequent lines.
public virtual IRelationalCommandBuilder DecrementIndent()
Returns
- IRelationalCommandBuilder
The same builder instance so that multiple calls can be chained.
IncrementIndent()
Increments the indent of subsequent lines.
public virtual IRelationalCommandBuilder IncrementIndent()
Returns
- IRelationalCommandBuilder
The same builder instance so that multiple calls can be chained.
ToString()
Gets the command text.
public override string ToString()