Skip to content

CaptureLogBehavior class

namespace: Serenity.Services   assembly: Serenity.Net.Services

Capture log behavior

public class CaptureLogBehavior : BaseSaveDeleteBehaviorAsync, IDeleteBehaviorSync, 
    IImplicitBehavior, ISaveBehaviorSync, IUndeleteBehaviorAsync, IUndeleteBehaviorSync

Public Members

name description
CaptureLogBehavior() The default constructor.
ActivateFor(…)
Log(…) Logs a capture log operation
LogAsync(…) Asynchronously logs a capture log operation
virtual OnAudit(…) (3 methods)
override OnAuditAsync(…) (2 methods)
virtual OnAuditAsync(…)

Remarks

Writes a new capture log row for each audited change and closes the previous active row, similar to SQL Server temporal tables. The captured columns are exactly the table fields declared on the capture log row type, so a field is excluded by simply not declaring it on that row type. ValidFrom/ValidUntil values are stored as UTC unless those fields are explicitly annotated with Local. Capture log tables grow with every change and are not pruned automatically, so a periodic cleanup is recommended.

See Also