Exemplo n.º 1
0
        public Task ApplyEvents(ProjectionUpdateBatch batch, IProjection projection, DocumentStore store,
                                CancellationToken cancellationToken)
        {
            return(Task.Run(async() =>
            {
                await using var operations = new ProjectionDocumentSession(store, _tenant, batch);

                await projection.ApplyAsync(operations, _actions, cancellationToken);
            }, cancellationToken));
        }
Exemplo n.º 2
0
 public async Task ApplyEvents(ProjectionUpdateBatch batch, IProjection projection, DocumentStore store,
                               CancellationToken cancellationToken)
 {
     await using var operations = new ProjectionDocumentSession(store, batch, new SessionOptions { Tracking = DocumentTracking.None, Tenant = _tenant });
     await projection.ApplyAsync(operations, _actions, cancellationToken).ConfigureAwait(false);
 }