public void OnGet() { var results = _client.SearchForAllGames("Assassins Creed"); var query = from game in results where game.OriginalReleaseDate != null select game; Games = results.ToList(); }
public IActionResult ViewInventoryItems(string searchString) { // Get API key: string apikey = config.GetConnectionString("GiantBombAPI"); var giantBomb = new GiantBombRestClient(apikey); if (!String.IsNullOrEmpty(searchString)) { var results = giantBomb.SearchForAllGames(searchString); Log.Information("Successfully got inventory items"); return(View(results)); } return(View(new List <GiantBomb.Api.Model.Game>())); }