Ejemplo n.º 1
0
 public TestQuestion(int id, string content, RPTestPartType partType)
 => (Id, Content, Part) = (id, content, (int)partType);
Ejemplo n.º 2
0
 public async Task <IEnumerable <Question> > GetPartQuestions(RPTestPartType partType)
 => (await database.QuestionRepository.GetAll())
 .Where(q => q.Part == (int)partType)
 .SortRandom()
 .Take(partType == RPTestPartType.PartOne ? PartOneQuestionsCount : PartTwoQuestionsCount);