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
IColumnThe column.
originalValue
objectThe original value of the property mapped to this column.
value
objectThe current value of the property mapped to this column.
property
IPropertyThe property that maps to the column.
typeMapping
RelationalTypeMappingThe relational type mapping to be used for the command parameter.
read
boolIndicates whether a value must be read from the database for the column.
write
boolIndicates whether a value must be written to the database for the column.
key
boolIndicates whether the column part of a primary or alternate key.
condition
boolIndicates whether the column is used in the
WHERE
clause when updating.sensitiveLoggingEnabled
boolIndicates 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
IUpdateEntryThe Microsoft.EntityFrameworkCore.Update.IUpdateEntry that represents the entity that is being modified.
property
IPropertyThe property that maps to the column.
column
IColumnBaseThe column to be modified.
generateParameterName
Func<string>A delegate for generating parameter names for the update SQL.
typeMapping
RelationalTypeMappingThe relational type mapping to be used for the command parameter.
valueIsRead
boolIndicates whether a value must be read from the database for the column.
valueIsWrite
boolIndicates whether a value must be written to the database for the column.
columnIsKey
boolIndicates whether the column part of a primary or alternate key.
columnIsCondition
boolIndicates whether the column is used in the
WHERE
clause when updating.sensitiveLoggingEnabled
boolIndicates 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
stringThe name of the JSON column.
value
objectThe current value of the JSON element located at the given JSON path.
property
IPropertyIn case of JSON column single scalar property modification, the scalar property that is being modified, null otherwise.
columnType
stringThe database type of the JSON column.
typeMapping
RelationalTypeMappingThe relational type mapping to be used for the command parameter.
jsonPath
stringThe JSON path leading to the JSON element that needs to be updated.
read
boolIndicates whether a value must be read from the database for the column.
write
boolIndicates whether a value must be written to the database for the column.
key
boolIndicates whether the column part of a primary or alternate key.
condition
boolIndicates whether the column is used in the
WHERE
clause when updating.sensitiveLoggingEnabled
boolIndicates 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
stringThe name of the column.
originalValue
objectThe original value of the property mapped to this column.
value
objectThe current value of the property mapped to this column.
property
IPropertyThe property that maps to the column.
columnType
stringThe database type of the column.
typeMapping
RelationalTypeMappingThe relational type mapping to be used for the command parameter.
read
boolIndicates whether a value must be read from the database for the column.
write
boolIndicates whether a value must be written to the database for the column.
key
boolIndicates whether the column part of a primary or alternate key.
condition
boolIndicates whether the column is used in the
WHERE
clause when updating.sensitiveLoggingEnabled
boolIndicates 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
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
obj
object
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)