public IActionResult Create(SubTechnicalGroup subTechnicalGroup) { if (!ModelState.IsValid) { return(View(subTechnicalGroup)); } _subTechnicalGroupRepository.Add(subTechnicalGroup); return(RedirectToAction(nameof(Details), nameof(SubTechnicalGroup), subTechnicalGroup.TechnicalGroupId)); }
public ActionResult Edit(SubTechnicalGroup subTechnicalGroup) { try { // TODO: Add update logic here _subTechnicalGroupRepository.Update(subTechnicalGroup); return(RedirectToAction(nameof(Index))); } catch { return(View(subTechnicalGroup)); } }