語言

DeleteDataOperation 類別

定義

A MigrationOperation 用於從現有資料表中刪除種子資料。

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

備註

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

建構函式

名稱 Description
DeleteDataOperation()

A MigrationOperation 用於從現有資料表中刪除種子資料。

屬性

名稱 Description
IsDestructiveChange

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

(繼承來源 MigrationOperation)
IsReadOnly

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

(繼承來源 AnnotatableBase)
Item[String]

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

(繼承來源 Annotatable)
KeyColumns

一份代表將用來識別應刪除列的欄位名稱清單。

KeyColumnTypes

列出用於識別應該刪除的列的儲存類型。

KeyValues

待刪除的列以鍵值陣列的列表表示,陣列中的每個值對應屬性中的 KeyColumns 一欄。

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)
GenerateModificationCommands(IModel)
已淘汰.

產生與此操作相對應的指令。

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 提供 則移除現有註解。

適用於