public ActionResult Enable(int id) { SectionViewModel section = SectionMapper.ToViewModel(sectionSrv.Get(id)); section.IsActive = true; sectionSrv.Edit(SectionMapper.ToEntity(section)); return(RedirectToAction("Disabled")); }
public ActionResult Edit(SectionViewModel model) { if (ModelState.IsValid) { var section = sectionSrv.Edit(SectionMapper.ToEntity(model)); model = SectionMapper.ToViewModel(section); } return(RedirectToAction("Edit", new { id = model.Id })); }