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 AuditStoreFailureBehaviorValues
| Value | Description |
|---|---|
Log = 0 | The failure is logged as an error, and the save or commit succeeds. The default. |
Throw = 1 | SaveChanges, 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. |
AuditStoreException class
Thrown from SaveChanges, or from a transaction's commit, when IAuditStoretenantry-pro-efcore-iauditstore.md failed to write the entries of changes that were saved, with AuditOptions.OnStoreFailuretenantry-pro-efcore-auditoptions.md set to AuditStoreFailureBehavior.Throwtenantry-pro-efcore-auditstorefailurebehavior.md.
AuditTiming enum
When audit logging passes a save's entries to IAuditStoretenantry-pro-efcore-iauditstore.md.