示例#1
0
 public IActionResult Delete(PersonModel personModel)
 {
     SourceManager.Delete(personModel.ID);
     TempData["mess"]  = "Deleted";
     TempData["alert"] = "alert alert-danger";
     return(Redirect("/Person/index"));
 }
示例#2
0
        public IActionResult Remove(int id)
        {
            PersonModel person = SourceManager.GetByID(id);

            SourceManager.Delete(id);
            TempData["Info"] = $"Usunięto {person.FirstName} {person.LastName}";
            return(Redirect("Index"));
        }