Beispiel #1
0
        public IActionResult Delete(Membership model)
        {
            var temp = membershipData.Delete(model.Id);

            membershipData.Commit();
            TempData["TempMessage"] = "The membership is deleted!";
            return(RedirectToAction("List"));
        }
        public IActionResult OnPost(int id)
        {
            var temp = membershipData.Delete(id);

            if (temp == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            membershipData.Commit();
            TempData["TempMessage"] = "The membership is deleted!";
            return(RedirectToPage("./List"));
        }