コード例 #1
0
        public IHttpActionResult GetByGameId(int gameId)
        {
            PerkService perkService = CreatePerkService();
            var         perks       = perkService.GetPerksByGameId(gameId);

            foreach (PerkListItem h in perks)
            {
                h.GameURL = "https://" + HttpContext.Current.Request.Url.Authority + "/api/Game?GameId=" + h.GameId;
            }
            return(Ok(perks));
        }