public ActionResult GetScreeningsOrVisit(string actionType, int actionId) { IEnumerable <Activities> screenings = null; switch (actionType) { case "Films": screenings = wishListRepo.getFilmActivities(actionId); break; case "Specials": screenings = wishListRepo.getSpecialActivities(actionId); break; case "Restaurants": break; default: screenings = null; break; } if (screenings != null) { ViewBag.NewActivityId = new SelectList(screenings, "id", "startTime", null); } return(PartialView(new EditActivityViewModel())); }