Beispiel #1
0
 protected virtual void BeforeSave(DisposableSaveHandle saveHandle)
 {
     saveHandle.StopWatch.Stop();
     saveHandle.AuditLog.ExecutionDuration = Convert.ToInt32(saveHandle.StopWatch.Elapsed.TotalMilliseconds);
     ExecutePostContributors(saveHandle.AuditLog);
     MergeEntityChanges(saveHandle.AuditLog);
 }
Beispiel #2
0
        protected virtual void Save(DisposableSaveHandle saveHandle)
        {
            BeforeSave(saveHandle);

            if (ShouldSave(saveHandle.AuditLog))
            {
                _auditingStore.Save(saveHandle.AuditLog);
            }
        }
Beispiel #3
0
        protected virtual async Task SaveAsync(DisposableSaveHandle saveHandle)
        {
            BeforeSave(saveHandle);

            if (ShouldSave(saveHandle.AuditLog))
            {
                await _auditingStore.SaveAsync(saveHandle.AuditLog);
            }
        }