public void AddQuestionAndAnswer(QuestionAndAnswer questionAndAnswer) { if (_questionAndAnswers.Any(q => q.Question == questionAndAnswer.Question)) { return; } _questionAndAnswers.Add(questionAndAnswer); }
public void AddQuestionAndAnswer(string question, string answer) { var questionAndAnswer = new QuestionAndAnswer(Clean(question)) { Answer = Clean(answer) }; AddQuestionAndAnswer(questionAndAnswer); }