Beispiel #1
0
        [HttpGet] // można w przyszłości zmienić na Post i dorobić jakiegoś Ajaxa do usuwania
        public ActionResult Delete(decimal id)
        {
            if (_athRepo.Delete(id))
            {
                TempData["Success"] = "Deleted successfully!";
            }
            else
            {
                TempData["Error"] = "Error deleting athlete!";
            }


            return(RedirectToAction("List"));
        }