// GET: /Course/Details/5
        public async Task <ActionResult> Details(int id)
        {
            Course obj = await _logic.GetCourse(id);

            if (obj == null)
            {
                return(HttpNotFound());
            }
            return(View(obj));
        }
Пример #2
0
        public IActionResult View(int id)
        {
            string callerId = _userManager.GetUserId(HttpContext.User);

            try
            {
                var courseVm = _courseLogic.GetCourse(callerId, id);
                return(View(courseVm));
            }
            catch (NotFoundException)
            {
                return(NotFound());
            }
        }