Ejemplo n.º 1
0
        public ActionResult Delete(int teamId)
        {
            bool result = teamProvider.DeleteTeam(teamId);

            if (!result)
            {
                log.Error("Controller: Team, Action: DeleteTeam Don't delete Team");
            }
            return(RedirectToAction("ShowTeams"));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteTeam(string id)
        {
            var team = await teamProvider.GetTeam(id);

            if (team == null)
            {
                return(NotFound("Team not found"));
            }
            await teamProvider.DeleteTeam(team);

            return(Ok(id));
        }