public bool Execute() { var comments = ticketCommentRepository.GetByTicketId(Id); comments.ForEach(comment => ticketCommentRepository.Delete(comment.Id)); var attr = ticketAttributionRepository.GetFromTicket(Id); if (attr != null) { ticketAttributionRepository.Delete(attr.Id); } var ware = ticketWareRepository.GetByTicketId(Id); if (ware != null) { ticketWareRepository.Delete(Id); } return(ticketRepository.Delete(Id)); }
public bool Execute() { return(ticketWareRepository.Delete(Id)); }