Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        public Task SaveChangesAsync(CancellationToken cancellationToken = default)
        {
            OnBeforeSave();

            return(_inner.SaveChangesAsync(cancellationToken));
        }
Пример #4
0
 public async Task SaveChangesAsync()
 {
     await repositories.SaveChangesAsync();
 }