Пример #1
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            try
            {
                CourseDto model     = _universityService.FindCourse(id.Value);
                var       viewModel = new CourseDetailsViewModel(model);

                return(View(viewModel));
            }
            catch (DomainException e)
            {
                Logger.Error(e);
                return(HttpNotFound());
            }
        }