语言

DeleteDataOperation 类

定义

用于 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
继承
特性
实现

注解

有关详细信息和示例,请参阅 数据库迁移 。

构造函数

名称 说明
DeleteDataOperation()

用于 MigrationOperation 从现有表中删除种子数据。

属性

名称 说明
IsDestructiveChange

指示操作是否可能导致数据库中数据丢失。

(继承自 MigrationOperation)
IsReadOnly

指示当前对象是否为只读。

(继承自 AnnotatableBase)
Item[String]

获取具有给定名称的值批注,如果不存在,则 null 返回该值。

(继承自 Annotatable)
KeyColumns

表示将用于标识应删除的行的列名的列表。

KeyColumnTypes

将用于标识应删除的行的列的存储类型的列表。

KeyValues

要删除的行,表示为键值数组的列表,其中数组中的每个值对应于属性中的 KeyColumns 列。

Schema

包含表的架构,或者 null 是否应使用默认架构。

Table

将从中删除数据的表。

方法

名称 说明
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)

显式接口实现

名称 说明
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)

扩展方法

名称 说明
AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>)

向对象添加批注。

AnnotationsToDebugString(IAnnotatable, Int32)

获取针对对象上声明的所有批注的调试字符串。

GetAnnotation(IAnnotatable, String)

获取具有给定名称的批注,如果不存在,则引发该批注。

GetAnnotation(IMutableAnnotatable, String)

获取具有给定名称的批注,如果不存在,则引发该批注。

GetOrAddAnnotation(IMutableAnnotatable, String, String)

获取具有给定键的现有批注,或添加一个新批注(如果不存在)。

SetOrRemoveAnnotation(IMutableAnnotatable, String, Object)

设置存储在给定名称下的批注。 如果已存在具有指定名称的批注,则覆盖现有批注。 如果 null 已提供,则删除现有批注。

适用于