语言

SingularModificationCommandBatch 类

定义

此实现 AffectedCountModificationCommandBatch 不支持批处理,方法是将批处理中的命令数限制为 1。

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

public class SingularModificationCommandBatch : Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch
type SingularModificationCommandBatch = class
    inherit AffectedCountModificationCommandBatch
Public Class SingularModificationCommandBatch
Inherits AffectedCountModificationCommandBatch
继承

注解

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

构造函数

名称 说明
SingularModificationCommandBatch(IRelationalCommandBuilderFactory, ISqlGenerationHelper, IUpdateSqlGenerator, IRelationalValueBufferFactoryFactory)

创建新的 SingularModificationCommandBatch 实例。

SingularModificationCommandBatch(ModificationCommandBatchFactoryDependencies)

创建新的 SingularModificationCommandBatch 实例。

属性

名称 说明
AreMoreBatchesExpected

指示此批之后是否应有更多批。

(继承自 ReaderModificationCommandBatch)
CachedCommandText

获取或设置批处理中命令的缓存命令文本。

(继承自 ReaderModificationCommandBatch)
CommandResultSet

ResultSetMapping中ModificationCommands每个命令的 s。

(继承自 ReaderModificationCommandBatch)
Dependencies

此服务的关系提供程序特定的依赖项。

(继承自 ReaderModificationCommandBatch)
IsCommandTextEmpty

是否已将任何 SQL 添加到批处理命令文本。

(继承自 ReaderModificationCommandBatch)
LastCachedCommandIndex

为其生成命令文本的最后一个命令的序号。

(继承自 ReaderModificationCommandBatch)
MaxBatchSize

可添加到单个批处理的最大实例数 ModificationCommand 。

(继承自 ReaderModificationCommandBatch)
ModificationCommands

批处理中概念性插入/更新/删除 ModificationCommands的列表。

(继承自 ReaderModificationCommandBatch)
ParameterValues

获取批处理中命令的参数值。

(继承自 ReaderModificationCommandBatch)
RelationalCommandBuilder

获取批处理中命令的关系命令生成器。

(继承自 ReaderModificationCommandBatch)
RequiresTransaction

指示批处理是否需要事务才能正确执行。

(继承自 ReaderModificationCommandBatch)
ResultSetMappings

ResultSetMapping中ModificationCommands每个命令的 s。

(继承自 ReaderModificationCommandBatch)
SqlBuilder

获取批处理中命令的命令文本生成器。

(继承自 ReaderModificationCommandBatch)
SqlGenerationHelper

SQL 生成的帮助程序。

(继承自 ReaderModificationCommandBatch)
StoreCommand

调用此批处理时 Complete(Boolean) 生成的 store 命令。

(继承自 ReaderModificationCommandBatch)
UpdateSqlGenerator

更新 SQL 生成器。

(继承自 ReaderModificationCommandBatch)

方法

名称 说明
AddCommand(IReadOnlyModificationCommand)

在列表中的给定位置 ModificationCommands 添加命令的“更新”命令文本。

(继承自 ReaderModificationCommandBatch)
AddCommand(ModificationCommand)

将给定的插入/更新/删除 ModificationCommands 添加到批处理。

(继承自 ReaderModificationCommandBatch)
AddParameter(IColumnModification)

为要为此批处理生成的关系命令添加给定 columnModification 参数。

(继承自 ReaderModificationCommandBatch)
AddParameters(IReadOnlyModificationCommand)

将给定 modificationCommand 的所有列修改的参数添加到为此批处理生成的关系命令。

(继承自 ReaderModificationCommandBatch)
CanAddCommand(IReadOnlyModificationCommand)

仅当尚未添加任何命令时返回 true 。

CanAddCommand(ModificationCommand)

仅当尚未添加任何命令时返回 true 。

Complete(Boolean)

指示不会再向此批处理添加任何命令,并准备执行命令。

(继承自 ReaderModificationCommandBatch)
Consume(DbDataReader)

此实现 AffectedCountModificationCommandBatch 不支持批处理,方法是将批处理中的命令数限制为 1。

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

(继承自 AffectedCountModificationCommandBatch)
Consume(RelationalDataReader)

使用由 Execute(IRelationalConnection).. 创建的数据读取器。

(继承自 AffectedCountModificationCommandBatch)
ConsumeAsync(DbDataReader, CancellationToken)

此实现 AffectedCountModificationCommandBatch 不支持批处理,方法是将批处理中的命令数限制为 1。

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

(继承自 AffectedCountModificationCommandBatch)
ConsumeAsync(RelationalDataReader, CancellationToken)

使用由 ExecuteAsync(IRelationalConnection, CancellationToken).. 创建的数据读取器。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSet(Int32, RelationalDataReader)

使用创建 Execute(IRelationalConnection)的数据读取器,将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetAsync(Int32, RelationalDataReader, CancellationToken)

使用创建 ExecuteAsync(IRelationalConnection, CancellationToken)的数据读取器,将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithoutPropagation(Int32, DbDataReader)

此实现 AffectedCountModificationCommandBatch 不支持批处理,方法是将批处理中的命令数限制为 1。

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

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithoutPropagation(Int32, RelationalDataReader)

使用创建的数据读取器,无需 Execute(IRelationalConnection) 将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithoutPropagationAsync(Int32, DbDataReader, CancellationToken)

此实现 AffectedCountModificationCommandBatch 不支持批处理,方法是将批处理中的命令数限制为 1。

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

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithoutPropagationAsync(Int32, RelationalDataReader, CancellationToken)

使用创建的数据读取器,无需 ExecuteAsync(IRelationalConnection, CancellationToken) 将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithPropagation(Int32, DbDataReader)

此实现 AffectedCountModificationCommandBatch 不支持批处理,方法是将批处理中的命令数限制为 1。

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

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithPropagation(Int32, RelationalDataReader)

使用创建 Execute(IRelationalConnection)的数据读取器,将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithPropagationAsync(Int32, DbDataReader, CancellationToken)

此实现 AffectedCountModificationCommandBatch 不支持批处理,方法是将批处理中的命令数限制为 1。

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

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithPropagationAsync(Int32, RelationalDataReader, CancellationToken)

使用创建 ExecuteAsync(IRelationalConnection, CancellationToken)的数据读取器,将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithRowsAffectedOnly(Int32, RelationalDataReader)

使用创建的数据读取器,无需 Execute(IRelationalConnection) 将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
ConsumeResultSetWithRowsAffectedOnlyAsync(Int32, RelationalDataReader, CancellationToken)

使用创建的数据读取器,无需 ExecuteAsync(IRelationalConnection, CancellationToken) 将值传播回该数据读取器中 ModificationCommand。

(继承自 AffectedCountModificationCommandBatch)
CreateStoreCommand()

为批处理生成一个 RawSqlCommand 。

(继承自 ReaderModificationCommandBatch)
CreateValueBufferFactory(IReadOnlyList<ColumnModification>)

IRelationalValueBufferFactory创建将用于创建ValueBuffer数据读取器的数据读取器。

(继承自 ReaderModificationCommandBatch)
CreateValueBufferFactory(IReadOnlyList<IColumnModification>)

IRelationalValueBufferFactory创建将用于创建ValueBuffer数据读取器的数据读取器。

(继承自 ReaderModificationCommandBatch)
Execute(IRelationalConnection)

使用给定的连接针对数据库执行此批处理生成的命令。

(继承自 ReaderModificationCommandBatch)
ExecuteAsync(IRelationalConnection, CancellationToken)

使用给定的连接针对数据库执行此批处理生成的命令。

(继承自 ReaderModificationCommandBatch)
GetCommandText()

获取当前批处理中所有命令的命令文本,并缓存该 CachedCommandText命令。

(继承自 ReaderModificationCommandBatch)
GetParameterCount()

获取批处理所需的参数总数。

(继承自 ReaderModificationCommandBatch)
IsCommandTextValid()

返回结果 true ,因为只生成单个命令,因此命令文本必须有效。

IsValid()

检查命令文本是否有效。

(继承自 ReaderModificationCommandBatch)
ResetCommandText()

重置生成器以开始生成新的批处理。

(继承自 ReaderModificationCommandBatch)
RollbackLastCommand(IReadOnlyModificationCommand)

回滚添加的最后一个命令。 添加命令时使用,导致批处理变得无效(例如 CommandText 太长)。

(继承自 ReaderModificationCommandBatch)
SetRequiresTransaction(Boolean)

设置批处理是否需要事务才能正确执行。

(继承自 ReaderModificationCommandBatch)
ThrowAggregateUpdateConcurrencyException(Int32, Int32, Int32)

引发一个异常,指示命令影响了意外的行数。

(继承自 AffectedCountModificationCommandBatch)
ThrowAggregateUpdateConcurrencyException(RelationalDataReader, Int32, Int32, Int32)

引发一个异常,指示命令影响了意外的行数。

(继承自 AffectedCountModificationCommandBatch)
ThrowAggregateUpdateConcurrencyExceptionAsync(RelationalDataReader, Int32, Int32, Int32, CancellationToken)

引发一个异常,指示命令影响了意外的行数。

(继承自 AffectedCountModificationCommandBatch)
TryAddCommand(IReadOnlyModificationCommand)

尝试将给定的插入/更新/删除 modificationCommand 添加到批处理。

(继承自 ReaderModificationCommandBatch)
UpdateCachedCommandText(Int32)

更新列表中给定位置处命令的 ModificationCommands 命令文本。

(继承自 ReaderModificationCommandBatch)

适用于