Example #1
0
        public ActionResult OrderBy(string order)
        {
            var restaurants = applicationServices.GetRestaurantsByOrder(order);

            TempData["restaurants"] = restaurants;
            return(RedirectToAction("Index"));
        }
        public void PrintByOrder(string order)
        {
            List <Restaurant> restaurants = _pzServices.GetRestaurantsByOrder(order);

            if (restaurants.Count == 0)
            {
                Console.WriteLine("Invalid order argument.");
            }
            else
            {
                Print(restaurants);
            }
        }