Table of Contents

Interface IReadOnlyModificationCommand

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

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

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

public interface IReadOnlyModificationCommand

Remarks

See Implementation of database providers and extensions for more information and examples.

Properties

ColumnModifications

The list of IColumnModification needed to perform the insert, update, or delete.

IReadOnlyList<IColumnModification> ColumnModifications { get; }

Property Value

IReadOnlyList<IColumnModification>

EntityState

The Microsoft.EntityFrameworkCore.EntityState that indicates whether the row will be inserted (Microsoft.EntityFrameworkCore.EntityState.Added), updated (Microsoft.EntityFrameworkCore.EntityState.Modified), or deleted ((Microsoft.EntityFrameworkCore.EntityState.Deleted).

EntityState EntityState { get; }

Property Value

EntityState

Entries

The Microsoft.EntityFrameworkCore.Update.IUpdateEntry that represent the entities that are mapped to the row to update.

IReadOnlyList<IUpdateEntry> Entries { get; }

Property Value

IReadOnlyList<IUpdateEntry>

RowsAffectedColumn

When using a stored procedure, this optionally points to the output parameter or result column containing the rows affected.

IColumnBase? RowsAffectedColumn { get; }

Property Value

IColumnBase

Schema

The schema containing the table, or null to use the default schema.

string? Schema { get; }

Property Value

string

StoreStoredProcedure

The stored procedure to use for updating the data.

IStoreStoredProcedure? StoreStoredProcedure { get; }

Property Value

IStoreStoredProcedure

Table

The table containing the data to be modified.

ITable? Table { get; }

Property Value

ITable

TableName

The name of the table containing the data to be modified.

string TableName { get; }

Property Value

string

Methods

PropagateOutputParameters(DbParameterCollection, int)

Reads output parameters returned from the database in the given parameterCollection and propagates them back to into the appropriate IColumnModification from which the values can be propagated on to tracked entities.

void PropagateOutputParameters(DbParameterCollection parameterCollection, int baseParameterIndex)

Parameters

parameterCollection DbParameterCollection

The parameter collection from which to propagate output values.

baseParameterIndex int

The index in parameterCollection on which parameters for this ModificationCommand begin.

PropagateResults(RelationalDataReader)

Reads result set columns returned from the database in the given relationalReader and propagates them back to into the appropriate IColumnModification from which the values can be propagated on to tracked entities.

void PropagateResults(RelationalDataReader relationalReader)

Parameters

relationalReader RelationalDataReader

The relational reader containing the values read from the database.