MigrationCommandListBuilder 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個建構器,用於建立一個 s 清單 MigrationCommand,然後執行以遷移資料庫。
public class MigrationCommandListBuilder
[System.Runtime.CompilerServices.Nullable(0)]
public class MigrationCommandListBuilder
type MigrationCommandListBuilder = class
[<System.Runtime.CompilerServices.Nullable(0)>]
type MigrationCommandListBuilder = class
Public Class MigrationCommandListBuilder
- 繼承
-
MigrationCommandListBuilder
- 屬性
備註
更多資訊與範例請參見 資料庫遷移 。
建構函式
| 名稱 | Description |
|---|---|
| MigrationCommandListBuilder(IRelationalCommandBuilderFactory) |
建立一個新的建構者實例。 |
| MigrationCommandListBuilder(MigrationsSqlGeneratorDependencies) |
建立一個新的建構者實例。 |
屬性
| 名稱 | Description |
|---|---|
| Dependencies |
此服務的關聯提供者專屬相依關係。 |
方法
| 名稱 | Description |
|---|---|
| Append(Object) |
將給定物件(以字串形式)附加到正在建立的指令上。 |
| Append(String) |
將給定字串附加到正在建立的指令上。 |
| AppendLine() |
在正在建立的指令上開始新一行。 |
| AppendLine(FormattableString) |
將給定字串附加到正在建立的指令上,然後開始新一行。 |
| AppendLine(Object) |
將給定物件(以字串形式)附加到正在建立的指令上,然後開始新一行。 |
| AppendLine(String) |
將給定字串附加到正在建立的指令上,然後開始新一行。 |
| AppendLines(Object) |
將所建指令附加給定物件,作為多行文字。 也就是說,傳遞物件中的每一行(作為字串)都會作為一行加入正在建立的指令。 這樣可以讓線條的縮排正確。 |
| AppendLines(String) |
將所建指令附加給定物件,作為多行文字。 也就是說,傳遞的字串中的每一行都會作為被建立指令的一行加入。 這樣可以讓線條的縮排正確。 |
| DecrementIndent() |
將目前的縮排減少一級。 |
| EndCommand(Boolean) |
結束目前指令的建置,並將其加入已建置指令清單。 下一次呼叫其中一個建構方法時,會開始建立一個新的指令。 |
| GetCommandList() |
會拿到已建構指令的清單。 |
| IncrementIndent() |
將當前的縮進增加一級。 |
| Indent() |
開始新的縮排區塊,所以所有的「Append...」在區塊被處理前,通話會比當前層級多縮排一層。 |