private IActionResult TryToCreate(TeamDTO team) { try { TeamDTO created = teamServices.CreateTeam(team); return(CreatedAtRoute("GetTeam", new { teamId = created.Name + "_" + team.SportName }, created)); } catch (ServicesException e) { return(BadRequest(e.Message)); } }