コード例 #1
0
        public ActionResult AddToTheGame(int id)
        {
            Advertisement ad   = _advertisementRepository.GetAdvertisement(id);
            Game          game = new Game {
                Card = ad, GameVote = 0, MaxVoteCount = 5
            };

            _gameRepository.AddCardToTheGame(game);
            _advertisementRepository.AddToTheGame(id);
            return(RedirectToAction("userAdList", "Advertisement"));
        }