public IActionResult Index(string city, string state) { List <Show> shows = (from s in repo.Shows where s.Venue.City.ToLower() == city.ToLower() && s.Venue.State.ToLower() == state.ToLower() select s).ToList(); ViewBag.Names = new Dictionary <int, string>(); foreach (Show s in shows) { if (s.ArtistNames.Length < 1) { ViewBag.Names.Add(s.ShowID, repo.GetArtistNames(s)); } } SortShows(shows); return(View(shows)); }