Ejemplo n.º 1
0
        public async Task <ActionResult <Collection <Player> > > getPlayers(int gameId)
        {
            Collection <PlayerEntity> players = _gameservice.getAllPlayers(gameId);

            if (players == null || players.Count < 1)
            {
                return(NotFound("No Players for the Game or Game not found."));
            }
            return(await Task.FromResult(_gameBridge.mapToPlayerCollectionFrom(players)));
        }