예제 #1
0
        public IQueryable <MordorGame> GetMordorGame()
        {
            var _db = new CriticalGamers.Models.GameContext();
            IQueryable <MordorGame> query = _db.MordorGame;

            return(query);
        }
예제 #2
0
        public IQueryable <Platform> GetPlatforms()
        {
            var db = new CriticalGamers.Models.GameContext();
            IQueryable <Platform> query = db.Platforms;

            return(query);
        }
예제 #3
0
        public IQueryable <RetroGame> GetRetroGames([QueryString("id")] int?platformId)
        {
            var _db = new CriticalGamers.Models.GameContext();
            IQueryable <RetroGame> query = _db.RetroGames;

            if (platformId.HasValue && platformId > 0)
            {
                query = query.Where(r => r.PlatformID == platformId);
            }
            return(query);
        }
예제 #4
0
        public IQueryable <RetroGame> GetRetroGames([QueryString("retrogameID")] int?retrogameId)
        {
            var db = new CriticalGamers.Models.GameContext();
            IQueryable <RetroGame> query = db.RetroGames;

            if (retrogameId.HasValue && retrogameId > 0)
            {
                query = query.Where(r => r.RetroGameID == retrogameId);
            }
            else
            {
                query = null;
            }
            return(query);
        }