CreateIndexOperation 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
A MigrationOperation 代表建立新的索引。
public class CreateIndexOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
[System.Diagnostics.DebuggerDisplay("CREATE INDEX {Name} ON {Table}")]
[System.Runtime.CompilerServices.Nullable(0)]
public class CreateIndexOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation, Microsoft.EntityFrameworkCore.Migrations.Operations.ITableMigrationOperation
[System.Diagnostics.DebuggerDisplay("CREATE INDEX {Name} ON {Table}")]
public class CreateIndexOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
[System.Diagnostics.DebuggerDisplay("CREATE INDEX {Name} ON {Table}")]
public class CreateIndexOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation, Microsoft.EntityFrameworkCore.Migrations.Operations.ITableMigrationOperation
type CreateIndexOperation = class
inherit MigrationOperation
[<System.Diagnostics.DebuggerDisplay("CREATE INDEX {Name} ON {Table}")>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type CreateIndexOperation = class
inherit MigrationOperation
interface ITableMigrationOperation
[<System.Diagnostics.DebuggerDisplay("CREATE INDEX {Name} ON {Table}")>]
type CreateIndexOperation = class
inherit MigrationOperation
[<System.Diagnostics.DebuggerDisplay("CREATE INDEX {Name} ON {Table}")>]
type CreateIndexOperation = class
inherit MigrationOperation
interface ITableMigrationOperation
Public Class CreateIndexOperation
Inherits MigrationOperation
Public Class CreateIndexOperation
Inherits MigrationOperation
Implements ITableMigrationOperation
- 繼承
- 繼承
- 屬性
- 實作
備註
更多資訊與範例請參見 資料庫遷移 。
建構函式
| 名稱 | Description |
|---|---|
| CreateIndexOperation() |
A MigrationOperation 代表建立新的索引。 |
屬性
| 名稱 | Description |
|---|---|
| Columns |
組成索引的欄位名稱排序清單。 |
| Filter |
一個用作索引過濾器的表達式。 |
| IsDescending |
一組值,指示每個對應的索引欄是否採用遞減排序順序。 |
| IsDestructiveChange |
表示操作是否可能導致資料庫資料遺失。 (繼承來源 MigrationOperation) |
| IsReadOnly |
表示目前物件是否為唯讀。 (繼承來源 AnnotatableBase) |
| IsUnique |
表示該指數是否應該強制執行唯一性。 |
| Item[String] |
取得帶有名稱的值註解,若不存在則回 |
| Name |
索引的名稱。 |
| Schema |
包含索引的結構,或 |
| Table |
包含索引的資料表。 |
方法
明確介面實作
擴充方法
| 名稱 | Description |
|---|---|
| AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>) |
為物件添加註解。 |
| AnnotationsToDebugString(IAnnotatable, Int32) |
取得物件上所有宣告註解的除錯字串。 |
| GetAnnotation(IAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetAnnotation(IMutableAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetOrAddAnnotation(IMutableAnnotatable, String, String) |
取得帶有特定鍵的現有註解,或若不存在註解則新增。 |
| SetOrRemoveAnnotation(IMutableAnnotatable, String, Object) |
設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 |