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")); }
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)); }