public ActionResult Create(CreateCourseForm form) { if (!ModelState.IsValid) { return(View(form)); } try { _universityService.CreateCourse(form.ConvertToDto(), out var id); return(RedirectToAction("Details", new { id })); } catch (DomainException e) { Logger.Error(e); throw new HttpException(503, e.Message); } }