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