public async Task AddManyAsync(IEnumerable <WorkflowDefinition> entities, CancellationToken cancellationToken = default) { var list = entities.ToList(); await _store.AddManyAsync(list, cancellationToken); foreach (var entity in list) { await _mediator.Publish(new WorkflowDefinitionSaved(entity), cancellationToken); } }
public async Task AddManyAsync(IEnumerable <WorkflowDefinition> entities, CancellationToken cancellationToken = default) { var list = entities.ToList(); foreach (var entity in list) { Initialize(entity); } await _store.AddManyAsync(list, cancellationToken); }