Share via


MigrationCommandListBuilder Class

Definition

A builder for creating a list of MigrationCommands that can then be executed to migrate a database.

public class MigrationCommandListBuilder
type MigrationCommandListBuilder = class
Public Class MigrationCommandListBuilder
Inheritance
MigrationCommandListBuilder

Remarks

See Database migrations for more information and examples.

Constructors

MigrationCommandListBuilder(IRelationalCommandBuilderFactory)

Creates a new instance of the builder.

MigrationCommandListBuilder(MigrationsSqlGeneratorDependencies)

Creates a new instance of the builder.

Properties

Dependencies

Relational provider-specific dependencies for this service.

Methods

Append(Object)

Appends the given object (as a string) to the command being built.

Append(String)

Appends the given string to the command being built.

AppendLine()

Starts a new line on the command being built.

AppendLine(Object)

Appends the given object (as a string) to the command being built, and then starts a new line.

AppendLine(String)

Appends the given string to the command being built, and then starts a new line.

AppendLines(Object)

Appends the given object to the command being built as multiple lines of text. That is, each line in the passed object (as a string) is added as a line to the command being built. This results in the lines having the correct indentation.

AppendLines(String)

Appends the given object to the command being built as multiple lines of text. That is, each line in the passed string is added as a line to the command being built. This results in the lines having the correct indentation.

DecrementIndent()

Decreases the current indentation by one level.

EndCommand(Boolean)

Ends the building of the current command and adds it to the list of built commands. The next call to one of the builder methods will start building a new command.

GetCommandList()

Gets the list of built commands.

IncrementIndent()

Increases the current indentation by one level.

Indent()

Starts a new indentation block, so all 'Append...' calls until the block is disposed will be indented one level more than the current level.

Applies to