Docs
Tenantry ProAPI reference

AuditStoreFailureBehavior enum

Namespace: Tenantry.Pro.EfCore · Package: Tenantry.Pro.EfCore · API reference

What happens when IAuditStore fails to write the entries of changes that are already saved, with AuditTiming.AfterCommit. Set with AuditOptions.OnStoreFailure.

public enum AuditStoreFailureBehavior

Values

ValueDescription
Log = 0The failure is logged as an error, and the save or commit succeeds. The default.
Throw = 1SaveChanges, or the commit, throws an AuditStoreException, which holds the entries, once every entry it could write is written. The changes are saved all the same: do not save them again. In a TransactionScope, or a transaction the connection was enlisted in (Database.EnlistTransaction), whose completion Tenantry cannot throw from, the failure is logged.

On this page