public ActionResult Edit(TechnicalGroup technicalGroup) { try { // TODO: Add update logic here _technicalGroupRepository.Update(technicalGroup); return(RedirectToAction(nameof(Index))); } catch { return(View(technicalGroup)); } }
public ActionResult Create(TechnicalGroup technicalGroup) { if (!ModelState.IsValid) { return(View(technicalGroup)); } try { // TODO: Add insert logic here _technicalGroupRepository.Add(technicalGroup); return(RedirectToAction(nameof(Index))); } catch { return(View(technicalGroup)); } }