Exemplo n.º 1
0
        public ActionResult Edit(EditCourseForm form)
        {
            if (!ModelState.IsValid)
            {
                return(View(form));
            }

            try
            {
                _universityService.EditCourse(form.ConvertToDto());
                _editFormStorage.Clear(form.Id);

                return(RedirectToAction("Index"));
            }
            catch (DomainException e)
            {
                Logger.Error(e);
                throw new HttpException(503, e.Message);
            }
        }