public Task <bool> Handle(RemoveChatbotCommand message, CancellationToken cancellationToken) { if (!message.IsValid()) { NotifyValidationErrors(message); return(Task.FromResult(false)); } _chatbotRepository.Remove(message.Id); /* * if (Commit()) * { * Bus.RaiseEvent(new UserRemovedEvent(message.Id)); * }*/ return(Task.FromResult(true)); }
public void Remove(Guid id) { var removeCommand = new RemoveChatbotCommand(id); Bus.SendCommand(removeCommand); }