CaptureLogBehavior.LogAsync method
Asynchronously logs a capture log operation
public Task LogAsync(IUnitOfWork uow, IRow? old, IRow? row, object? userId,
CancellationToken cancellationToken = default)
| parameter | description |
|---|---|
| uow | Unit of work |
| old | Old entity |
| row | New entity |
| userId | User ID |
| cancellationToken | Cancellation token |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | old and row are both null. |
| InvalidOperationException | Capture log row type does not implement ICaptureLogRow interface |
Remarks
The currently active log row is closed before inserting the new one. As this is not atomic across concurrent transactions for the same ID, a unique index on the mapped ID and ValidUntil columns is recommended to enforce a single active row.
See Also
- interface IUnitOfWork
- interface IRow
- class CaptureLogBehavior