ColumnOperation 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
A MigrationOperation 代表對柱子的運算。 請參閱 AddColumnOperation 與 AlterColumnOperation。
public class ColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class ColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation, Microsoft.EntityFrameworkCore.Migrations.Operations.ITableMigrationOperation
public abstract class ColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation, Microsoft.EntityFrameworkCore.Migrations.Operations.ITableMigrationOperation
type ColumnOperation = class
inherit MigrationOperation
[<System.Runtime.CompilerServices.Nullable(0)>]
type ColumnOperation = class
inherit MigrationOperation
interface ITableMigrationOperation
type ColumnOperation = class
inherit MigrationOperation
interface ITableMigrationOperation
Public Class ColumnOperation
Inherits MigrationOperation
Public MustInherit Class ColumnOperation
Inherits MigrationOperation
Implements ITableMigrationOperation
- 繼承
- 繼承
- 衍生
- 屬性
- 實作
備註
更多資訊與範例請參見 資料庫遷移 。
建構函式
| 名稱 | Description |
|---|---|
| ColumnOperation() |
A MigrationOperation 代表對柱子的運算。 請參閱 AddColumnOperation 與 AlterColumnOperation。 |
屬性
| 名稱 | Description |
|---|---|
| ClrType |
映射到欄位的屬性的 CLR Type 。 |
| Collation |
本欄的彙整,或 |
| ColumnType |
欄位的儲存類型——例如,'nvarchar(max)'。 |
| Comment |
在本專欄留言 |
| ComputedColumnSql |
如果欄位未被計算,則用來計算欄位值 |
| DefaultValue |
插入列時未明確定義此欄,或 |
| DefaultValueSql |
建立欄位 |
| IsDestructiveChange |
表示操作是否可能導致資料庫資料遺失。 (繼承來源 MigrationOperation) |
| IsFixedLength |
表示欄位是否受限於固定長度資料。 |
| IsNullable |
表示欄位是否能儲存 |
| IsReadOnly |
表示目前物件是否為唯讀。 (繼承來源 AnnotatableBase) |
| IsRowVersion |
表示此欄位是否像 SQL Server 上的「rowversion」/「timestamp」欄位一樣,作為自動並發標記。 |
| IsStored |
該屬性所映射的計算欄位值是儲存在資料庫中,還是在讀取時計算。 |
| IsUnicode |
指示欄位是否能包含 Unicode 資料,或 |
| Item[String] |
取得帶有名稱的值註解,若不存在則回 |
| MaxLength |
欄位可儲存的最大資料量,或 |
| Name |
欄位名稱。 |
| Precision |
欄位可儲存的最大數字數,或 |
| Scale |
欄位可儲存的最大小數點數,或 |
| Schema |
包含該表格的結構,或 |
| Table |
包含該欄位的表格。 |
方法
明確介面實作
擴充方法
| 名稱 | Description |
|---|---|
| AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>) |
為物件添加註解。 |
| AnnotationsToDebugString(IAnnotatable, Int32) |
取得物件上所有宣告註解的除錯字串。 |
| GetAnnotation(IAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetAnnotation(IMutableAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetOrAddAnnotation(IMutableAnnotatable, String, String) |
取得帶有特定鍵的現有註解,或若不存在註解則新增。 |
| SetOrRemoveAnnotation(IMutableAnnotatable, String, Object) |
設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 |