示例#1
0
        public IActionResult OnPost(int whiskeyId)
        {
            var whiskey = whiskeyData.Delete(whiskeyId);

            whiskeyData.Commit();
            if (whiskey == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            TempData["Message"] = $"{whiskey.Name} deleted";
            return(RedirectToPage("./List"));
        }
示例#2
0
        public IActionResult OnPost(int WhiskeyId)
        {
            var whiskey = whiskeyData.Delete(WhiskeyId);

            return(RedirectToPage("./Index"));
        }