public IList <DisplayResults> GetUserList(string username)
        {
            IList <DisplayResults> getUserGames = new List <DisplayResults>();

            IList <UserGameInfo> userGame = new List <UserGameInfo>();

            userGame = userGameInfoSQLDAO.PullUserGameInfo(username);

            foreach (UserGameInfo x in userGame)
            {
                DisplayResults newGameResult = new DisplayResults();
                newGameResult.UserGameInfo = x;
                newGameResult.GameInfo     = gameInfoSQLDAO.PullGameByID(x.Game_Id);
                newGameResult.Rating       = gameRatingSQLDAO.PullGameRating(newGameResult.GameInfo.ratingId);
                newGameResult.Franchise    = franchiseSQLDAO.PullSpecificFranchise(newGameResult.GameInfo.franchiseID);
                newGameResult.Genre        = genresSQLDAO.PullGenreList(newGameResult.GameInfo.genreID);
                newGameResult.Platform     = platformsSQLDAO.PullPlatformList(newGameResult.GameInfo.platformID);

                getUserGames.Add(newGameResult);
            }



            return(getUserGames);
        }
Пример #2
0
        public void PullGenresByID()
        {
            int[]          testArray = new int[] { 10, 5, 8 };
            IList <Genres> testList  = dao.PullGenreList(testArray);

            Assert.AreEqual(3, testList.Count);
        }