public void Handle(RemoveFolioPatternCommand message) { if (!message.IsValid()) { NotifyValidationErrors(message); return; } var folioPattern = _folioPatternRepository.GetById(message.Id); _folioPatternRepository.Remove(folioPattern.Id); if (Commit()) { Bus.RaiseEvent(new FolioPatternRemovedEvent(message.Id)); } }
public void Remove(string id) { var removeCommand = new RemoveFolioPatternCommand(id); Bus.SendCommand(removeCommand); }