public QuestionWithAnswer GetQuestionById(int id) { if (id <= 0 || id > QuestionsWithAnswer.Count()) { throw new ArgumentOutOfRangeException(); } return(QuestionsWithAnswer.Find(id)); }
public void AddQuestion(QuestionWithAnswer question) { QuestionsWithAnswer.Add(question); SaveChanges(); }