Beispiel #1
0
        public IActionResult Index()
        {
            var repo = new QuestionsRepository(_connectionString);
            var vm   = new IndexViewModel()
            {
                Questions = repo.GetQuestions()
            };

            return(View(vm));
        }
Beispiel #2
0
        public IActionResult Index()
        {
            var repo = new QuestionsRepository(_connectionString);
            var vm   = new IndexViewModel
            {
                Questions      = repo.GetQuestions(),
                UserIsLoggedIn = User.Identity.IsAuthenticated
            };

            return(View(vm));
        }
        public IActionResult Index()
        {
            var repository = new QuestionsRepository(_conn);

            return(View(repository.GetQuestions()));
        }