Table of Contents

Interface IColumnModification

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

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

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

public interface IColumnModification

Remarks

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

Properties

Column

The column.

IColumnBase? Column { get; }

Property Value

IColumnBase

ColumnName

The name of the column.

string ColumnName { get; }

Property Value

string

ColumnType

The database type of the column.

string? ColumnType { get; }

Property Value

string

Entry

The Microsoft.EntityFrameworkCore.Update.IUpdateEntry that represents the entity that is being modified.

IUpdateEntry? Entry { get; }

Property Value

IUpdateEntry

IsCondition

Indicates whether the column is used in the WHERE clause when updating.

bool IsCondition { get; set; }

Property Value

bool

IsKey

Indicates whether the column is part of a primary or alternate key.

bool IsKey { get; set; }

Property Value

bool

IsNullable

A value indicating whether the column could contain a null value.

bool? IsNullable { get; }

Property Value

bool?

IsRead

Indicates whether a value must be read from the database for the column.

bool IsRead { get; set; }

Property Value

bool

IsWrite

Indicates whether a value must be written to the database for the column.

bool IsWrite { get; set; }

Property Value

bool

JsonPath

In case of JSON column modification, the JSON path leading to the JSON element that needs to be updated.

string? JsonPath { get; }

Property Value

string

OriginalParameterName

The parameter name to use for the original value parameter (UseOriginalValueParameter), if needed.

string? OriginalParameterName { get; }

Property Value

string

OriginalValue

The original value of the property mapped to this column.

object? OriginalValue { get; set; }

Property Value

object

ParameterName

The parameter name to use for the current value parameter (UseCurrentValueParameter), if needed.

string? ParameterName { get; }

Property Value

string

Property

The property that maps to the column.

IProperty? Property { get; }

Property Value

IProperty

Remarks

In case of JSON column single scalar property modification, the scalar property that is being modified.

TypeMapping

The relational type mapping for the column.

RelationalTypeMapping? TypeMapping { get; }

Property Value

RelationalTypeMapping

UseCurrentValue

Indicates whether the current value of the property should be used.

bool UseCurrentValue { get; }

Property Value

bool

UseCurrentValueParameter

Indicates whether the current value of the property must be passed as a parameter to the SQL.

bool UseCurrentValueParameter { get; }

Property Value

bool

UseOriginalValue

Indicates whether the original value of the property should be used.

bool UseOriginalValue { get; }

Property Value

bool

UseOriginalValueParameter

Indicates whether the original value of the property must be passed as a parameter to the SQL.

bool UseOriginalValueParameter { get; }

Property Value

bool

UseParameter

Indicates whether the value of the property must be passed as a parameter to the SQL as opposed to being inlined.

bool UseParameter { get; }

Property Value

bool

Value

Gets or sets the current value of the property mapped to this column.

object? Value { get; set; }

Property Value

object

Methods

AddSharedColumnModification(IColumnModification)

Adds a modification affecting the same database value.

void AddSharedColumnModification(IColumnModification modification)

Parameters

modification IColumnModification

The modification for the shared column.

ResetParameterNames()

Resets parameter names, so they can be regenerated if the command needs to be re-added to a new batch.

void ResetParameterNames()