public ActionResult Show(int id) { Dictionary <string, object> dick = new Dictionary <string, object>(); List <RestaurantClass> restaurantList = RestaurantClass.FindById(id); List <CuisineClass> cuisineList = CuisineClass.FindById(restaurantList[0].GetCuisineId()); dick.Add("restaurant", restaurantList); dick.Add("cuisine", cuisineList); return(View(dick)); }
public ActionResult CuisineDetails(int id) { Dictionary <string, object> megAdick = new Dictionary <string, object>(); List <CuisineClass> cuisineList = CuisineClass.FindById(id); List <RestaurantClass> restaurantList = RestaurantClass.GetAllRestaurants(id); megAdick.Add("restaurant", restaurantList); megAdick.Add("cuisine", cuisineList); return(View("ShowCuisine", megAdick)); }
public ActionResult Show(string reviewName, int reviewStar, string reviewDescription, int id) { ReviewClass newReview = new ReviewClass(reviewName, reviewDescription, reviewStar, id); newReview.Save(); Dictionary <string, object> dick = new Dictionary <string, object>(); List <RestaurantClass> restaurantList = RestaurantClass.FindById(id); List <CuisineClass> cuisineList = CuisineClass.FindById(restaurantList[0].GetCuisineId()); List <ReviewClass> reviewList = ReviewClass.GetAllReviewsByRestaurantId(id); dick.Add("restaurant", restaurantList); dick.Add("cuisine", cuisineList); dick.Add("review", reviewList); return(View("ShowReview", dick)); }