Exemplo n.º 1
0
 public List<AnswerData> GetAllForQuestion(Guid questionId)
 {
     using (var context = new ReadContext())
     {
         return context.Answers.Where(a => a.QuestionId == questionId).ToList();
     }
 }
Exemplo n.º 2
0
 public QuestionData GetQuestionDetails(Guid questionId)
 {
     using (var context = new ReadContext())
     {
         return context.Questions.FirstOrDefault(q => q.Id == questionId);
     }
 }
Exemplo n.º 3
0
   public List<QuestionData> AllQuestions()
 {
      using (var context = new ReadContext())
     {
         return context.Questions.ToList();
     }
 }
Exemplo n.º 4
0
 public int AllQuestionsCount()
 {
     using (var context = new ReadContext())
     {
         return context.Questions.Count();
     }
 }