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
columnIColumnThe column.
originalValueobjectThe original value of the property mapped to this column.
valueobjectThe current value of the property mapped to this column.
propertyIPropertyThe property that maps to the column.
typeMappingRelationalTypeMappingThe relational type mapping to be used for the command parameter.
readboolIndicates whether a value must be read from the database for the column.
writeboolIndicates whether a value must be written to the database for the column.
keyboolIndicates whether the column part of a primary or alternate key.
conditionboolIndicates whether the column is used in the
WHEREclause when updating.sensitiveLoggingEnabledboolIndicates whether potentially sensitive data (e.g. database values) can be logged.
isNullablebool?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
entryIUpdateEntryThe Microsoft.EntityFrameworkCore.Update.IUpdateEntry that represents the entity that is being modified.
propertyIPropertyThe property that maps to the column.
columnIColumnBaseThe column to be modified.
generateParameterNameFunc<string>A delegate for generating parameter names for the update SQL.
typeMappingRelationalTypeMappingThe relational type mapping to be used for the command parameter.
valueIsReadboolIndicates whether a value must be read from the database for the column.
valueIsWriteboolIndicates whether a value must be written to the database for the column.
columnIsKeyboolIndicates whether the column part of a primary or alternate key.
columnIsConditionboolIndicates whether the column is used in the
WHEREclause when updating.sensitiveLoggingEnabledboolIndicates 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
columnNamestringThe name of the JSON column.
valueobjectThe current value of the JSON element located at the given JSON path.
propertyIPropertyIn case of JSON column single scalar property modification, the scalar property that is being modified, null otherwise.
columnTypestringThe database type of the JSON column.
typeMappingRelationalTypeMappingThe relational type mapping to be used for the command parameter.
jsonPathstringThe JSON path leading to the JSON element that needs to be updated.
readboolIndicates whether a value must be read from the database for the column.
writeboolIndicates whether a value must be written to the database for the column.
keyboolIndicates whether the column part of a primary or alternate key.
conditionboolIndicates whether the column is used in the
WHEREclause when updating.sensitiveLoggingEnabledboolIndicates whether potentially sensitive data (e.g. database values) can be logged.
isNullablebool?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
columnNamestringThe name of the column.
originalValueobjectThe original value of the property mapped to this column.
valueobjectThe current value of the property mapped to this column.
propertyIPropertyThe property that maps to the column.
columnTypestringThe database type of the column.
typeMappingRelationalTypeMappingThe relational type mapping to be used for the command parameter.
readboolIndicates whether a value must be read from the database for the column.
writeboolIndicates whether a value must be written to the database for the column.
keyboolIndicates whether the column part of a primary or alternate key.
conditionboolIndicates whether the column is used in the
WHEREclause when updating.sensitiveLoggingEnabledboolIndicates whether potentially sensitive data (e.g. database values) can be logged.
isNullablebool?A value indicating whether the value could be null.
Properties
Column
The column.
public IColumnBase? Column { get; init; }
Property Value
ColumnName
The name of the column.
public string ColumnName { get; init; }
Property Value
ColumnType
The database type of the column.
public string? ColumnType { get; init; }
Property Value
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
IsCondition
Indicates whether the column is used in the WHERE clause when updating.
public bool IsCondition { get; init; }
Property Value
IsKey
Indicates whether the column is part of a primary or alternate key.
public bool IsKey { get; init; }
Property Value
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
IsWrite
Indicates whether a value must be written to the database for the column.
public bool IsWrite { get; init; }
Property Value
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
OriginalValue
The original value of the property mapped to column.
public object? OriginalValue { get; init; }
Property Value
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
TypeMapping
The relational type mapping for the column.
public RelationalTypeMapping? TypeMapping { get; init; }
Property Value
Value
The current value of the property mapped to column.
public object? Value { get; init; }
Property Value
Methods
Equals(ColumnModificationParameters)
public bool Equals(ColumnModificationParameters other)
Parameters
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(ColumnModificationParameters, ColumnModificationParameters)
public static bool operator ==(ColumnModificationParameters left, ColumnModificationParameters right)
Parameters
Returns
operator !=(ColumnModificationParameters, ColumnModificationParameters)
public static bool operator !=(ColumnModificationParameters left, ColumnModificationParameters right)