コード例 #1
0
        public IActionResult Delete(int id)
        {
            if (ModelState.IsValid)
            {
                var result = statuses.DeleteStatus(id);

                if (result)
                {
                    TempData["message"] = $"Status has been deleted.";
                }

                return(RedirectToAction("List"));
            }
            else
            {
                return(View());
            }
        }