Ejemplo n.º 1
0
        public IEnumerable <SelectListItem> SelectGameSeries(UserProfileInfo user, Game game)
        {
            var GameSeries = user.GameSeries.ToList();
            IEnumerable <SelectListItem> selectList =
                from g in GameSeries
                select new SelectListItem
            {
                Selected = (g.GameSerieID == game.GameSerieID),
                Text     = g.Name,
                Value    = g.GameSerieID.ToString()
            };

            return(selectList);
        }
Ejemplo n.º 2
0
        public IEnumerable<SelectListItem> SelectGameSeries(UserProfileInfo user, Game game)
        {
            var GameSeries = user.GameSeries.ToList();
            IEnumerable<SelectListItem> selectList =
                from g in GameSeries
                select new SelectListItem
                {
                    Selected = (g.GameSerieID == game.GameSerieID),
                    Text = g.Name,
                    Value = g.GameSerieID.ToString()
                };

            return selectList;
        }