public IActionResult Edit(SectionViewModel vm) { if (ModelState.IsValid) { var section = _mapper.Map <Section>(vm); _sectionService.EditSection(section); return(RedirectToAction("List", "Section")); } return(View(vm)); }