Class ActionLog
Represents a single audit record written by SaveChangesWithAuditAsync(Guid?, Formatting?).
Mapped to the ActionLog table, or action_log (snake_case columns) when the provider is PostgreSQL (Npgsql).
public class ActionLog
- Inheritance
-
ActionLog
- Inherited Members
Properties
ActionType
Gets or sets the kind of change that was recorded. Persisted as a string (maximum 10 characters).
public AuditAction ActionType { get; set; }
Property Value
ColumnName
Gets or sets the name of the property that was changed.
Only populated when ActionType is Update.
public string ColumnName { get; set; }
Property Value
ColumnNewValue
Gets or sets the value of ColumnName after the update, converted to a string.
Only populated when ActionType is Update.
public string ColumnNewValue { get; set; }
Property Value
ColumnOldValue
Gets or sets the value of ColumnName before the update, converted to a string.
Only populated when ActionType is Update.
public string ColumnOldValue { get; set; }
Property Value
CreatedBy
Gets or sets the identifier of the user who made the change, or null if no user was supplied.
public Guid? CreatedBy { get; set; }
Property Value
- Guid?
CreatedDate
Gets or sets the date and time (UTC) at which the audit record was created.
public DateTime CreatedDate { get; set; }
Property Value
Id
Gets or sets the primary key of the audit record.
[Key]
public long Id { get; set; }
Property Value
RecordValue
Gets or sets a JSON snapshot of the audited entity.
For Insert it contains the key and the inserted values;
for Delete it contains the key and the values before deletion;
for Update it is null.
Stored as a json column on PostgreSQL.
public string RecordValue { get; set; }
Property Value
ReferenceId
Gets or sets the primary key value of the audited entity, stored as a string.
For entities with a composite key, only the first key value is recorded.
public string ReferenceId { get; set; }
Property Value
ReferenceTable
Gets or sets the name of the audited entity.
This is the CLR type name of the entity (not the mapped database table name),
optionally converted with the KYS.Library.Helpers.FormattingHelper.Formatting passed to
SaveChangesWithAuditAsync(Guid?, Formatting?).
public string ReferenceTable { get; set; }