Exemple #1
0
        // GET: ReviewController
        public ActionResult Index(int id)
        {
            Tuple <List <Review>, int> result = _reviewBL.GetReviews(_restaurantBL.GetRestaurantById(id));

            ViewBag.Restaurant = _restaurantBL.GetRestaurantById(id);
            if (result.Item1.Count > 0)
            {
                ViewData.Add("OverallRating", result.Item2);
                return(View(result.Item1));
            }
            else
            {
                ViewData.Add("OverallRating", "No reviews yet");
                return(View(new List <Review>()));
            }
        }
Exemple #2
0
 // GET: RestaurantController/Delete/5
 public ActionResult Delete(int id)
 {
     return(View(_restaurantBL.GetRestaurantById(id)));
 }