public IActionResult Edit(int id, NotifyPopup notifyPopup) { if (id != notifyPopup.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _notifyPopupRepository.UpdateNotifyPopup(notifyPopup); } catch (DbUpdateConcurrencyException) { if (!_notifyPopupRepository.NotifyPopupExists(notifyPopup.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(notifyPopup)); }