public IQueryable <MordorGame> GetMordorGame() { var _db = new CriticalGamers.Models.GameContext(); IQueryable <MordorGame> query = _db.MordorGame; return(query); }
public IQueryable <Platform> GetPlatforms() { var db = new CriticalGamers.Models.GameContext(); IQueryable <Platform> query = db.Platforms; return(query); }
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); }
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); }