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())); }
public async Task <IEnumerable <Quiz> > GetAllAsync() { return(await quizRepo.GetAllQuizzes()); }