語言

DropColumnOperation 類別

定義

MigrationOperation A 表示刪除現有的柱子。

public class DropColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
[System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} DROP COLUMN {Name}")]
[System.Runtime.CompilerServices.Nullable(0)]
public class DropColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation, Microsoft.EntityFrameworkCore.Migrations.Operations.ITableMigrationOperation
[System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} DROP COLUMN {Name}")]
public class DropColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
[System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} DROP COLUMN {Name}")]
public class DropColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation, Microsoft.EntityFrameworkCore.Migrations.Operations.ITableMigrationOperation
type DropColumnOperation = class
    inherit MigrationOperation
[<System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} DROP COLUMN {Name}")>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DropColumnOperation = class
    inherit MigrationOperation
    interface ITableMigrationOperation
[<System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} DROP COLUMN {Name}")>]
type DropColumnOperation = class
    inherit MigrationOperation
[<System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} DROP COLUMN {Name}")>]
type DropColumnOperation = class
    inherit MigrationOperation
    interface ITableMigrationOperation
Public Class DropColumnOperation
Inherits MigrationOperation
Public Class DropColumnOperation
Inherits MigrationOperation
Implements ITableMigrationOperation
繼承
DropColumnOperation
繼承
屬性
實作

備註

更多資訊與範例請參見 資料庫遷移 。

建構函式

名稱 Description
DropColumnOperation()

建立一個新的 實例。DropColumnOperation

屬性

名稱 Description
IsDestructiveChange

表示操作是否可能導致資料庫資料遺失。

(繼承來源 MigrationOperation)
IsReadOnly

表示目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
Item[String]

取得帶有名稱的值註解,若不存在則回 null 傳。

(繼承來源 Annotatable)
Name

欄位名稱。

Schema

包含該表格的結構,或 null 是否應該使用預設結構。

Table

包含該欄位的表格。

方法

名稱 Description
AddAnnotation(String, Annotation)

為此物件新增註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 Annotatable)
AddAnnotation(String, Object)

為此物件新增註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 Annotatable)
AddAnnotations(IEnumerable<IAnnotation>)

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

為此物件新增執行時註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Object)

為此物件新增執行時註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
CreateAnnotation(String, Object)

建立新的註解。

(繼承來源 Annotatable)
CreateRuntimeAnnotation(String, Object)

建立新的執行時註解。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀,則會拋出。

(繼承來源 Annotatable)
EnsureReadOnly()

若模型非唯讀,則會擲出。

(繼承來源 Annotatable)
FindAnnotation(String)

取得帶有名字的註解,若不存在則回 null 傳。

(繼承來源 Annotatable)
FindRuntimeAnnotation(String)

取得帶有名稱的執行時註解,若不存在則回 null 傳。

(繼承來源 AnnotatableBase)
GetAnnotation(String)

取得帶有名稱的註解,若不存在則拋出。

(繼承來源 AnnotatableBase)
GetAnnotations()

取得目前物件的所有註解。

(繼承來源 Annotatable)
GetOrAddAnnotation(String, Object)

為此物件新增註解,或若已有已具指定名稱的註解,則回傳該標註。

(繼承來源 Annotatable)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

取得帶有名稱的執行時註解值,若不存在則加入該註解。

(繼承來源 AnnotatableBase)
GetRuntimeAnnotations()

取得目前物件上的所有執行時註解。

(繼承來源 AnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

當註解被設定或移除時會被呼叫。

(繼承來源 Annotatable)
RemoveAnnotation(String)

移除該物件中給定的註解。

(繼承來源 Annotatable)
RemoveRuntimeAnnotation(String)

移除該物件中給定的執行時註解。

(繼承來源 AnnotatableBase)
SetAnnotation(String, Annotation, Annotation)

設定在指定鍵下儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 Annotatable)
SetAnnotation(String, Annotation)

設定在指定鍵下儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 Annotatable)
SetAnnotation(String, Object)

設定在指定鍵下儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 Annotatable)
SetRuntimeAnnotation(String, Annotation, Annotation)

設定在指定鍵值下儲存的執行時註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 AnnotatableBase)
SetRuntimeAnnotation(String, Object)

設定在指定鍵值下儲存的執行時註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 AnnotatableBase)

明確介面實作

名稱 Description
IAnnotatable.AddRuntimeAnnotation(String, Object)

為此物件新增執行時註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 AnnotatableBase)
IAnnotatable.FindAnnotation(String)

取得帶有名稱的註解,若不存在則回傳 null。

(繼承來源 Annotatable)
IAnnotatable.FindRuntimeAnnotation(String)

取得帶有名稱的執行時註解,若不存在則回 null 傳。

(繼承來源 AnnotatableBase)
IAnnotatable.GetAnnotations()

取得目前物件的所有註解。

(繼承來源 Annotatable)
IAnnotatable.GetRuntimeAnnotations()

取得目前物件上的所有執行時註解。

(繼承來源 AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

移除該物件中給定的執行時註解。

(繼承來源 AnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

設定在指定鍵值下儲存的執行時註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 AnnotatableBase)
IMutableAnnotatable.AddAnnotation(String, Object)

為此物件新增註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 Annotatable)
IMutableAnnotatable.RemoveAnnotation(String)

移除該物件中給定的註解。

(繼承來源 Annotatable)
IMutableAnnotatable.SetOrRemoveAnnotation(String, Object)

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。

(繼承來源 Annotatable)
IReadOnlyAnnotatable.FindAnnotation(String)

取得帶有名字的註解,若不存在則回 null 傳。

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

取得目前物件的所有註解。

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

取得帶有名稱的註解值,若不存在則回 null 傳。

(繼承來源 AnnotatableBase)

擴充方法

名稱 Description
AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>)

為物件添加註解。

AnnotationsToDebugString(IAnnotatable, Int32)

取得物件上所有宣告註解的除錯字串。

GetAnnotation(IAnnotatable, String)

取得帶有名稱的註解,若不存在則拋出。

GetAnnotation(IMutableAnnotatable, String)

取得帶有名稱的註解,若不存在則拋出。

GetOrAddAnnotation(IMutableAnnotatable, String, String)

取得帶有特定鍵的現有註解,或若不存在註解則新增。

SetOrRemoveAnnotation(IMutableAnnotatable, String, Object)

設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 null 提供 則移除現有註解。

適用於