语言

ModificationCommand 类

定义

表示要插入/更新/删除行的数据库的概念命令。

此类型通常由数据库提供程序使用;应用程序代码中通常不使用它。

public class ModificationCommand
[System.Runtime.CompilerServices.Nullable(0)]
public class ModificationCommand : Microsoft.EntityFrameworkCore.Update.IModificationCommand, Microsoft.EntityFrameworkCore.Update.INonTrackedModificationCommand
public class ModificationCommand : Microsoft.EntityFrameworkCore.Update.IModificationCommand
public class ModificationCommand : Microsoft.EntityFrameworkCore.Update.IModificationCommand, Microsoft.EntityFrameworkCore.Update.INonTrackedModificationCommand
type ModificationCommand = class
[<System.Runtime.CompilerServices.Nullable(0)>]
type ModificationCommand = class
    interface IModificationCommand
    interface IReadOnlyModificationCommand
    interface INonTrackedModificationCommand
type ModificationCommand = class
    interface IModificationCommand
    interface IReadOnlyModificationCommand
type ModificationCommand = class
    interface IModificationCommand
    interface IReadOnlyModificationCommand
    interface INonTrackedModificationCommand
Public Class ModificationCommand
Public Class ModificationCommand
Implements IModificationCommand, INonTrackedModificationCommand
Public Class ModificationCommand
Implements IModificationCommand
继承
ModificationCommand
特性
实现

注解

有关详细信息和示例,请参阅 数据库提供程序和扩展的实现 。

构造函数

名称 说明
ModificationCommand(ModificationCommandParameters)

初始化新的 ModificationCommand 实例。

ModificationCommand(NonTrackedModificationCommandParameters)

初始化新的 ModificationCommand 实例。

ModificationCommand(String, String, Func<String>, Boolean, IComparer<IUpdateEntry>)

初始化新的 ModificationCommand 实例。

ModificationCommand(String, String, Func<String>, Func<IProperty,IRelationalPropertyAnnotations>)

表示要插入/更新/删除行的数据库的概念命令。

此类型通常由数据库提供程序使用;应用程序代码中通常不使用它。

ModificationCommand(String, String, IReadOnlyList<ColumnModification>, Boolean)

初始化新的 ModificationCommand 实例。

ModificationCommand(String, String, IReadOnlyList<ColumnModification>)

初始化新的 ModificationCommand 实例。

属性

名称 说明
ColumnModifications

执行插入、更新或删除所需的列表 IColumnModification 。

EntityState

指示EntityState是插入行()、更新(AddedModified)还是已删除()。Deleted

Entries

表示 IUpdateEntry映射到要更新的行的实体的 s。

RequiresResultPropagation

指示数据库是否会返回一些映射属性的值,这些属性随后需要传播回跟踪的实体。

RowsAffectedColumn

使用存储过程时,这可以选择指向包含受影响行的输出参数或结果列。

Schema

包含表的架构,或使用 null 默认架构。

StoreStoredProcedure

用于更新数据的存储过程。

Table

包含要修改的数据的表。

TableName

包含要修改的数据的表的名称。

方法

名称 说明
AddColumnModification(ColumnModificationParameters)

创建一个新 IColumnModification 项并将其添加到此命令。

AddEntry(IUpdateEntry, Boolean)

这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。

AddEntry(IUpdateEntry)
已过时.

向此命令添加一个 IUpdateEntry 表示要插入、更新或删除的实体的命令。

AssertColumnsNotInitialized()

这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。

CreateColumnModification(ColumnModificationParameters)

创建实现 IColumnModification 接口的新实例。

ProcessSinglePropertyJsonUpdate(ColumnModificationParameters)

执行与单属性 JSON 更新对应的列修改所需的处理。

PropagateOutputParameters(DbParameterCollection, Int32)

读取给定数据库中 parameterCollection 从数据库返回的输出参数,并将其传播回 IColumnModification 相应的值,这些值可以从中传播到跟踪的实体。

PropagateResults(RelationalDataReader)

读取给定数据库中从数据库 relationalReader 返回的结果集列,并将其传播回 IColumnModification 相应的列,这些列可从中传播到跟踪的实体。

PropagateResults(ValueBuffer)

读取给定数据库中从数据库 ValueBuffer 返回的值,并将其传播回 IColumnModification 相应的值,这些值可以从中传播到跟踪的实体。

ToString()

表示要插入/更新/删除行的数据库的概念命令。

此类型通常由数据库提供程序使用;应用程序代码中通常不使用它。

适用于