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)); }
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); }