public void Delete(Question Question) { _iDQuestion.Delete <EChoiceImage>(a => a.Choice.QuestionId == Question.QuestionId); _iDQuestion.Delete <EChoice>(a => a.QuestionId == Question.QuestionId); _iDQuestion.Delete <EQuestionImage>(a => a.QuestionId == Question.QuestionId); _iDQuestion.Delete(EQuestion(Question)); }
public void Delete(List <Question> questions) { if (!questions?.Any() ?? true) { return; } List <EQuestion> eQuestions = EQuestion(questions); List <int> oldEQuestionIds = eQuestions.Where(a => a.QuestionId != 0).Select(a => a.QuestionId).ToList(); _iDQuestion.Delete <EQuestion>(a => oldEQuestionIds.Contains(a.QuestionId)); }
public void Delete(Question question) { _iDQuestion.Delete(EQuestion(question)); }
public void Delete(int questionId) { _iDQuestion.Delete <EQuestion>(a => a.QuestionId == questionId); }