public ActionResult Edit(EditionCourseViewModel model) { if (ModelState.IsValid) { var result = _courseAppService.EditCourse(model); if (result.IsValid) { return(RedirectToAction("Index")); } else { foreach (var item in result.Erros) { ModelState.AddModelError("", item.Message); } } } model.CourseType = FillCourseType(); return(View(model)); }