Table of Contents

Namespace Microsoft.EntityFrameworkCore.Update

Classes

AffectedCountModificationCommandBatch

A ReaderModificationCommandBatch for providers which append an SQL query to find out how many rows were affected (see AppendSelectAffectedCountCommand(StringBuilder, string, string, int)).

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

ColumnModification

Represents an update, insert, or delete operation for a single column. ModificationCommands contain lists of ColumnModifications.

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

ModificationCommand

Represents a conceptual command to the database to insert/update/delete a row.

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

ModificationCommandBatch

A base class for a collection of ModificationCommands that can be executed as a batch.

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

ModificationCommandBatchFactoryDependencies

Service dependencies parameter class for IModificationCommandBatchFactory

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

The service lifetime is Scoped. This means that each Microsoft.EntityFrameworkCore.DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

ReaderModificationCommandBatch

A base class for ModificationCommandBatch implementations that make use of a data reader.

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

SingularModificationCommandBatch

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.

UpdateSqlGenerator

A base class for the IUpdateSqlGenerator service that is typically inherited from by database providers.

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

The service lifetime is Singleton. This means a single instance is used by many Microsoft.EntityFrameworkCore.DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

UpdateSqlGeneratorDependencies

Service dependencies parameter class for UpdateSqlGenerator

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Do not construct instances of this class directly from either provider or application code as the constructor signature may change as new dependencies are added. Instead, use this type in your constructor so that an instance will be created and injected automatically by the dependency injection container. To create an instance with some dependent services replaced, first resolve the object from the dependency injection container, then replace selected services using the 'With...' methods. Do not call the constructor at any point in this process.

The service lifetime is Singleton. This means a single instance of each service is used by many Microsoft.EntityFrameworkCore.DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

Interfaces

IBatchExecutor

A service for executing one or more batches of insert/update/delete commands against a database.

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

The service lifetime is Scoped. This means that each Microsoft.EntityFrameworkCore.DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

ICommandBatchPreparer

A service for preparing a list of ModificationCommandBatchs for the entities represented by the given list of Microsoft.EntityFrameworkCore.Update.IUpdateEntrys.

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

The service lifetime is Scoped. This means that each Microsoft.EntityFrameworkCore.DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

IModificationCommandBatchFactory

A service for creating ModificationCommandBatch instances.

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

The service lifetime is Scoped. This means that each Microsoft.EntityFrameworkCore.DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

IUpdateSqlGenerator

A service used to generate SQL for insert, update, and delete commands, and related SQL operations needed for Microsoft.EntityFrameworkCore.DbContext.SaveChanges

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

The service lifetime is Singleton. This means a single instance is used by many Microsoft.EntityFrameworkCore.DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

Enums

ResultSetMapping

Indicates what kind of impact on the result set a given command will have.

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