Table of Contents

Class SingularModificationCommandBatch

Namespace
Microsoft.EntityFrameworkCore.Update
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

An implementation of AffectedCountModificationCommandBatch that does not support batching by limiting the number of commands in the batch to one.

This type is typically used by database providers; it is generally not used in application code.

public class SingularModificationCommandBatch : AffectedCountModificationCommandBatch
Inheritance
SingularModificationCommandBatch
Inherited Members

Constructors

SingularModificationCommandBatch(ModificationCommandBatchFactoryDependencies)

Creates a new SingularModificationCommandBatch instance.

public SingularModificationCommandBatch(ModificationCommandBatchFactoryDependencies dependencies)

Parameters

dependencies ModificationCommandBatchFactoryDependencies

Service dependencies.

Methods

CanAddCommand(ModificationCommand)

Only returns true if the no command has already been added.

protected override bool CanAddCommand(ModificationCommand modificationCommand)

Parameters

modificationCommand ModificationCommand

The command to potentially add.

Returns

bool

true if no command has already been added.

IsCommandTextValid()

Returns true since only a single command is generated so the command text must be valid.

protected override bool IsCommandTextValid()

Returns

bool

true