public ActionResult Index(string search) { if (!String.IsNullOrEmpty(search)) { return(View(applicationServices.GetRestaurantBySearch(search))); } if (TempData["restaurants"] == null) { return(View(applicationServices.GetAllRestaurants())); } return(View(TempData["restaurants"])); }
public void PrintAllRestaurants() { List <Restaurant> restaurants = _pzServices.GetAllRestaurants(); Print(restaurants); }