public IHttpActionResult GetPlayersByTeam(int teamId) { PlayerTeamService playerTeamService = CreatePlayerTeamService(); var playerteams = playerTeamService.GetPlayersByTeam(teamId); return(Ok(playerteams)); }
private PlayerTeamService CreatePlayerTeamService() { var userId = Guid.Parse(User.Identity.GetUserId()); var playerTeamService = new PlayerTeamService(userId); return(playerTeamService); }