public IActionResult Index() { var repo = new QuestionsRepository(_connectionString); var questions = repo.GetAllQuestions(); var vm = new IndexViewModel { Questions = questions }; return(View(vm)); }
public List <Question> GetAll() { return(_repo.GetAllQuestions().ToList()); }