public void Delete(DeleteWebhook command) { Guard.NotNull(command, nameof(command)); VerifyCreatedAndNotDeleted(); RaiseEvent(SimpleMapper.Map(command, new WebhookDeleted())); }
public SchemaDomainObject DeleteWebhook(DeleteWebhook command) { Guard.NotNull(command, nameof(command)); VerifyCreatedAndNotDeleted(); VerifyWebhookExists(command.Id); RaiseEvent(SimpleMapper.Map(command, new WebhookDeleted())); return(this); }
protected Task On(DeleteWebhook command, CommandContext context) { return(handler.UpdateAsync <SchemaDomainObject>(context, s => s.DeleteWebhook(command))); }
protected Task On(DeleteWebhook command, CommandContext context) { return(handler.UpdateAsync <WebhookDomainObject>(context, c => c.Delete(command))); }