示例#1
0
        public IActionResult Index(int id)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(RedirectToAction("Index", "Intro"));
            }
            TestOfSetsViewModel model = new TestOfSetsViewModel();

            model.user     = _userManager.GetBy(User.Identity.Name, User.Identity.Name);
            model.course   = _courseServices.GetBy(id);
            model.question = _courseServices.GetVocabulary(id);

            ViewData["Page.Title"]  = model.name;
            ViewData["Page.Target"] = "Học phần";
            return(View(model));
        }