Class DataChange
Represents a change to a specific column in a database row, capturing the old and new values.
public sealed class DataChange
- Inheritance
-
DataChange
- Inherited Members
Properties
ColumnName
Gets the name of the column where the change occurred.
public string ColumnName { get; init; }
Property Value
- string
The name of the column where the change occurred.
Remarks
This value represents the name of the affected database column.
DataType
Gets the data type of the column.
public Type? DataType { get; init; }
Property Value
- Type
The data type of the column.
Remarks
NewValue
Gets the value of the column after the change occurred.
public object? NewValue { get; init; }
Property Value
- object
The value of the column after the change occurred.
Remarks
This property may be null if the column does not have a new value (e.g., during a delete operation).
OldValue
Gets the value of the column before the change occurred.
public object? OldValue { get; init; }
Property Value
- object
The value of the column before the change occurred.
Remarks
This property may be null if the column did not have a previous value (e.g., during an insert operation).
Methods
ToString()
Returns a string representation of the DataChange instance.
public override string ToString()
Returns
- string
A string showing the column name, old value, new value, and data type.