Пример #1
0
 /// <summary>
 /// Saves the scope asynchronously.
 /// </summary>
 public async Task SaveScopeAsync(IAuditDbContext context, IAuditScope scope, EntityFrameworkEvent @event)
 {
     UpdateAuditEvent(@event, context);
     (scope.Event as AuditEventEntityFramework).EntityFrameworkEvent = @event;
     context.OnScopeSaving(scope);
     await scope.SaveAsync();
 }
Пример #2
0
 /// <summary>
 /// Saves the scope.
 /// </summary>
 public void SaveScope(IAuditDbContext context, IAuditScope scope, EntityFrameworkEvent @event)
 {
     UpdateAuditEvent(@event, context);
     (scope.Event as AuditEventEntityFramework).EntityFrameworkEvent = @event;
     context.OnScopeSaving(scope);
     scope.Save();
 }