コード例 #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"));
        }