public async Task SaveChangesAsync(CancellationToken cancellationToken = default) { var events = this.GetChanges().SelectMany(e => e.GetUncommittedChanges().ToList()).ToList(); await _inner.SaveChangesAsync(cancellationToken); await OnAfterSave(events, cancellationToken); }
public async Task SaveChangesAsync(CancellationToken cancellationToken = default) { var streams = this.GetChanges() .Select(e => new { Stream = e.GetStream(), Events = e.GetUncommittedChanges().ToList() }).ToList(); await _inner.SaveChangesAsync(cancellationToken); await OnAfterSave(streams, cancellationToken); }
public Task SaveChangesAsync(CancellationToken cancellationToken = default) { OnBeforeSave(); return(_inner.SaveChangesAsync(cancellationToken)); }
public async Task SaveChangesAsync() { await repositories.SaveChangesAsync(); }