public void Handle(RemoveLivroCommand message) { if (!message.IsValid()) { NotifyValidationErrors(message); return; } _livroRepository.Remove(message.Id); if (Commit()) { Bus.RaiseEvent(new LivroRemovedEvent(message.Id)); } }
public void Remove(Guid id) { var removeCommand = new RemoveLivroCommand(id); Bus.SendCommand(removeCommand); }