Table of Contents

Struct ColumnModificationParameters

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

Parameters for creating a ColumnModification instance.

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

public readonly struct ColumnModificationParameters : IEquatable<ColumnModificationParameters>
Implements
Inherited Members

Remarks

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

Constructors

ColumnModificationParameters(IColumn, object?, object?, IProperty?, RelationalTypeMapping?, bool, bool, bool, bool, bool, bool?)

Creates a new ColumnModificationParameters instance.

public ColumnModificationParameters(IColumn column, object? originalValue, object? value, IProperty? property, RelationalTypeMapping? typeMapping, bool read, bool write, bool key, bool condition, bool sensitiveLoggingEnabled, bool? isNullable = null)

Parameters

column IColumn

The column.

originalValue object

The original value of the property mapped to this column.

value object

The current value of the property mapped to this column.

property IProperty

The property that maps to the column.

typeMapping RelationalTypeMapping

The relational type mapping to be used for the command parameter.

read bool

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

write bool

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

key bool

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

condition bool

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

sensitiveLoggingEnabled bool

Indicates whether potentially sensitive data (e.g. database values) can be logged.

isNullable bool?

A value indicating whether the value could be null.

ColumnModificationParameters(IUpdateEntry?, IProperty?, IColumnBase, Func<string>, RelationalTypeMapping, bool, bool, bool, bool, bool)

Creates a new ColumnModificationParameters instance.

public ColumnModificationParameters(IUpdateEntry? entry, IProperty? property, IColumnBase column, Func<string> generateParameterName, RelationalTypeMapping typeMapping, bool valueIsRead, bool valueIsWrite, bool columnIsKey, bool columnIsCondition, bool sensitiveLoggingEnabled)

Parameters

entry IUpdateEntry

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

property IProperty

The property that maps to the column.

column IColumnBase

The column to be modified.

generateParameterName Func<string>

A delegate for generating parameter names for the update SQL.

typeMapping RelationalTypeMapping

The relational type mapping to be used for the command parameter.

valueIsRead bool

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

valueIsWrite bool

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

columnIsKey bool

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

columnIsCondition bool

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

sensitiveLoggingEnabled bool

Indicates whether potentially sensitive data (e.g. database values) can be logged.

ColumnModificationParameters(string, object?, IProperty?, string?, RelationalTypeMapping?, string, bool, bool, bool, bool, bool, bool?)

Creates a new ColumnModificationParameters instance specific for updating objects mapped to JSON column.

public ColumnModificationParameters(string columnName, object? value, IProperty? property, string? columnType, RelationalTypeMapping? typeMapping, string jsonPath, bool read, bool write, bool key, bool condition, bool sensitiveLoggingEnabled, bool? isNullable = null)

Parameters

columnName string

The name of the JSON column.

value object

The current value of the JSON element located at the given JSON path.

property IProperty

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

columnType string

The database type of the JSON column.

typeMapping RelationalTypeMapping

The relational type mapping to be used for the command parameter.

jsonPath string

The JSON path leading to the JSON element that needs to be updated.

read bool

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

write bool

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

key bool

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

condition bool

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

sensitiveLoggingEnabled bool

Indicates whether potentially sensitive data (e.g. database values) can be logged.

isNullable bool?

A value indicating whether the value could be null.

ColumnModificationParameters(string, object?, object?, IProperty?, string?, RelationalTypeMapping?, bool, bool, bool, bool, bool, bool?)

Creates a new ColumnModificationParameters instance.

public ColumnModificationParameters(string columnName, object? originalValue, object? value, IProperty? property, string? columnType, RelationalTypeMapping? typeMapping, bool read, bool write, bool key, bool condition, bool sensitiveLoggingEnabled, bool? isNullable = null)

Parameters

columnName string

The name of the column.

originalValue object

The original value of the property mapped to this column.

value object

The current value of the property mapped to this column.

property IProperty

The property that maps to the column.

columnType string

The database type of the column.

typeMapping RelationalTypeMapping

The relational type mapping to be used for the command parameter.

read bool

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

write bool

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

key bool

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

condition bool

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

sensitiveLoggingEnabled bool

Indicates whether potentially sensitive data (e.g. database values) can be logged.

isNullable bool?

A value indicating whether the value could be null.

Properties

Column

The column.

public IColumnBase? Column { get; init; }

Property Value

IColumnBase

ColumnName

The name of the column.

public string ColumnName { get; init; }

Property Value

string

ColumnType

The database type of the column.

public string? ColumnType { get; init; }

Property Value

string

Entry

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

public IUpdateEntry? Entry { get; init; }

Property Value

IUpdateEntry

GenerateParameterName

A delegate for generating parameter names for the update SQL.

public Func<string>? GenerateParameterName { get; init; }

Property Value

Func<string>

IsCondition

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

public bool IsCondition { get; init; }

Property Value

bool

IsKey

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

public bool IsKey { get; init; }

Property Value

bool

IsNullable

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

public bool? IsNullable { get; init; }

Property Value

bool?

IsRead

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

public bool IsRead { get; init; }

Property Value

bool

IsWrite

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

public bool IsWrite { get; init; }

Property Value

bool

JsonPath

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

public string? JsonPath { get; init; }

Property Value

string

OriginalValue

The original value of the property mapped to column.

public object? OriginalValue { get; init; }

Property Value

object

Property

The property that maps to the column.

public IProperty? Property { get; init; }

Property Value

IProperty

SensitiveLoggingEnabled

Indicates whether potentially sensitive data (e.g. database values) can be logged.

public bool SensitiveLoggingEnabled { get; init; }

Property Value

bool

TypeMapping

The relational type mapping for the column.

public RelationalTypeMapping? TypeMapping { get; init; }

Property Value

RelationalTypeMapping

Value

The current value of the property mapped to column.

public object? Value { get; init; }

Property Value

object

Methods

Equals(ColumnModificationParameters)

public bool Equals(ColumnModificationParameters other)

Parameters

other ColumnModificationParameters

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ColumnModificationParameters, ColumnModificationParameters)

public static bool operator ==(ColumnModificationParameters left, ColumnModificationParameters right)

Parameters

left ColumnModificationParameters
right ColumnModificationParameters

Returns

bool

operator !=(ColumnModificationParameters, ColumnModificationParameters)

public static bool operator !=(ColumnModificationParameters left, ColumnModificationParameters right)

Parameters

left ColumnModificationParameters
right ColumnModificationParameters

Returns

bool