Ejemplo n.º 1
0
        public IActionResult Delete(string formModal)
        {
            var id = formModal;

            var superpower = _teamServices.GetById(id);

            if (superpower != null)
            {
                _teamServices.DeleteById(id);

                var currentTeamList = _teamServices.GetAll();
                return(RedirectToAction("ListTeams", currentTeamList));
            }
            else
            {
                return(Json("Invalid Id.Try again"));
            }
        }