public IActionResult Edit(EditVm input) { if (ModelState.IsValid == false) { return(View(nameof(Edit), input)); } if (_usersStore.TryUpdate(input.ToModel())) { TempData["Success"] = "The changes were saved."; } else { TempData["Error"] = "An error occured and the changes were NOT saved."; } return(RedirectToAction(nameof(Edit), new { input.Id })); }