public async Task AddAsync(WebhookDefinition entity, CancellationToken cancellationToken = default) { await _mediator.Publish(new WebhookDefinitionSaving(entity), cancellationToken); await _store.AddAsync(entity, cancellationToken); await _mediator.Publish(new WebhookDefinitionSaved(entity), cancellationToken); }
public async Task AddAsync(WebhookDefinition entity, CancellationToken cancellationToken = default) { entity = Initialize(entity); await _store.AddAsync(entity, cancellationToken); }