Class ModificationCommand
- Namespace
- Microsoft.EntityFrameworkCore.Update
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
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.
public class ModificationCommand : IModificationCommand, INonTrackedModificationCommand, IReadOnlyModificationCommand
- Inheritance
-
ModificationCommand
- Implements
- Inherited Members
Remarks
See Implementation of database providers and extensions for more information and examples.
Constructors
ModificationCommand(in ModificationCommandParameters)
Initializes a new ModificationCommand instance.
public ModificationCommand(in ModificationCommandParameters modificationCommandParameters)
Parameters
modificationCommandParameters
ModificationCommandParametersCreation parameters.
ModificationCommand(in NonTrackedModificationCommandParameters)
Initializes a new ModificationCommand instance.
public ModificationCommand(in NonTrackedModificationCommandParameters modificationCommandParameters)
Parameters
modificationCommandParameters
NonTrackedModificationCommandParametersCreation parameters.
Properties
ColumnModifications
The list of IColumnModification needed to perform the insert, update, or delete.
public virtual IReadOnlyList<IColumnModification> ColumnModifications { get; }
Property Value
EntityState
public virtual EntityState EntityState { get; set; }
Property Value
- EntityState
Entries
public virtual IReadOnlyList<IUpdateEntry> Entries { get; }
Property Value
- IReadOnlyList<IUpdateEntry>
RowsAffectedColumn
public virtual IColumnBase? RowsAffectedColumn { get; }
Property Value
Schema
public virtual string? Schema { get; }
Property Value
StoreStoredProcedure
public virtual IStoreStoredProcedure? StoreStoredProcedure { get; }
Property Value
Table
public virtual ITable? Table { get; }
Property Value
TableName
public virtual string TableName { get; }
Property Value
Methods
AddColumnModification(in ColumnModificationParameters)
Creates a new IColumnModification and add it to this command.
public virtual IColumnModification AddColumnModification(in ColumnModificationParameters columnModificationParameters)
Parameters
columnModificationParameters
ColumnModificationParametersCreation parameters.
Returns
- IColumnModification
The new IColumnModification instance.
AddEntry(IUpdateEntry, bool)
public virtual void AddEntry(IUpdateEntry entry, bool mainEntry)
Parameters
entry
IUpdateEntrymainEntry
bool
AssertColumnsNotInitialized()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
[Conditional("DEBUG")]
public virtual void AssertColumnsNotInitialized()
CreateColumnModification(in ColumnModificationParameters)
Creates a new instance that implements IColumnModification interface.
protected virtual IColumnModification CreateColumnModification(in ColumnModificationParameters columnModificationParameters)
Parameters
columnModificationParameters
ColumnModificationParametersCreation parameters.
Returns
- IColumnModification
The new instance that implements IColumnModification interface.
PropagateOutputParameters(DbParameterCollection, int)
public virtual void PropagateOutputParameters(DbParameterCollection parameterCollection, int baseParameterIndex)
Parameters
parameterCollection
DbParameterCollectionbaseParameterIndex
int
PropagateResults(RelationalDataReader)
public virtual void PropagateResults(RelationalDataReader relationalReader)
Parameters
relationalReader
RelationalDataReader
ToString()
public override string ToString()