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