Exemplo n.º 1
0
        public ScoreDTO GetUserScoresByName(string user)
        {
            ScoreDTO          scoreDTO   = new ScoreDTO();
            List <PlayerStat> returnList = scoreDAO.GetUserScoresByName(user);

            scoreDTO.ErrorCode = returnList.Count > 0 ? 0 : -1;
            scoreDTO.ErrorMsg  = returnList.Count > 0 ? "OK" : $"User '{user}' Does Not Exist Or Does Not Have Scores";
            scoreDTO.Scores    = returnList.Count > 0 ? returnList : null;
            return(scoreDTO);
        }