Пример #1
0
        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());
 }