Пример #1
0
        public IEnumerable <QuizListResponse> GetAllQuizzes()
        {
            var quizzes = quizRepo.GetAllQuizzes().ToList();

            GeneralHelpers.ThrowIfAnyAreNull(quizzes);

            return(quizzes.Select(q => new QuizListResponse
            {
                Id = q.Id,
                Description = q.Description,
                Name = q.Name
            }));
        }
 // GET: Quiz
 public async Task <ActionResult> IndexAsync()
 {
     return(View(await quizrepo.GetAllQuizzes()));
 }
Пример #3
0
 public async Task <IEnumerable <Quiz> > GetAllAsync()
 {
     return(await quizRepo.GetAllQuizzes());
 }