语言

ICommandBatchPreparer 接口

定义

一项 ModificationCommandBatch服务,用于为由给定的 s 列表表示的 IUpdateEntry实体准备 s 列表。

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

public interface ICommandBatchPreparer
public interface ICommandBatchPreparer : Microsoft.EntityFrameworkCore.Infrastructure.IResettableService
type ICommandBatchPreparer = interface
type ICommandBatchPreparer = interface
    interface IResettableService
Public Interface ICommandBatchPreparer
Public Interface ICommandBatchPreparer
Implements IResettableService
实现

注解

服务生存期为 Scoped。 这意味着每个 DbContext 实例都将使用此服务自己的实例。 实现可能依赖于注册到任何生存期的其他服务。 实现不需要线程安全。

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

方法

名称 说明
BatchCommands(IList<IUpdateEntry>, IUpdateAdapter)

创建插入/更新/删除给定列表 IUpdateEntry所表示的实体所需的命令批处理。

BatchCommands(IReadOnlyList<IUpdateEntry>)

创建插入/更新/删除给定列表 IUpdateEntry所表示的实体所需的命令批处理。

CreateCommandBatches(IEnumerable<IReadOnlyModificationCommand>, Boolean)

给定一组修改命令后,考虑到最大批大小和其他批处理约束,为这些命令返回一个可执行准备的批处理。

ResetState()

重置服务,以便可以从池使用它。

(继承自 IResettableService)
ResetStateAsync(CancellationToken)

重置服务,以便可以从池使用它。

(继承自 IResettableService)

适用于