示例#1
0
        public IActionResult Delete(int humanId)
        {
            try
            {
                _humanRepository.RemoveHuman(humanId);
            }
            catch
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }

            return(View());
        }
示例#2
0
        public IActionResult Delete(int humanId)
        {
            try
            {
                _humanRepository.RemoveHuman(humanId);
            }
            catch
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }

            return(RedirectToRoute(new { controller = "Human", action = "Index" }));
        }