public IActionResult Delete(PersonModel personModel) { SourceManager.Delete(personModel.ID); TempData["mess"] = "Deleted"; TempData["alert"] = "alert alert-danger"; return(Redirect("/Person/index")); }
public IActionResult Remove(int id) { PersonModel person = SourceManager.GetByID(id); SourceManager.Delete(id); TempData["Info"] = $"Usunięto {person.FirstName} {person.LastName}"; return(Redirect("Index")); }