public async Task <ActionResult> Search(string searchTerms) { if (searchTerms.IsNullOrWhiteSpace()) { RedirectToAction("Index"); } var results = await _eventRepo.GetEventDetails(searchTerms); if (results == null) { RedirectToAction("Index", new RouteValueDictionary() { { "outcome", "not-event-found" } }); } return(View(results)); }