public ActionResult Search(string q)
 {
     var searchFor = q;
     var model = new ListRestaurantsModel();
     var restaurants = _restaurantService.GetRestaurantsBySearch(searchFor);
     foreach (var r in restaurants)
     {
         model.Restaurants.Add(new RestaurantModel
         {
             Id = r.Id,
             Active = r.Active,
             City = r.City,
             Description = r.Description,
             Email = r.Email,
             ImageUrl = r.ImageUrl,
             MaxGuests = r.MaxGuests,
             Name = r.Name,
             PostalCode = r.PostalCode,
             OpenTimes = r.OpenTimes,
             StreetAddress = r.StreetAddress
         });
     }
     return View(model);
 }
 public ActionResult Index()
 {
     var model = new ListRestaurantsModel();
     var restaurants = _restaurantService.GetAllRestaurants().ToList();
     foreach (var r in restaurants.Where(x => x.Active))
     {
         model.Restaurants.Add(new RestaurantModel
         {
             Id = r.Id,
             Active = r.Active,
             City = r.City,
             Description = r.Description,
             Email = r.Email,
             ImageUrl = r.ImageUrl,
             MaxGuests = r.MaxGuests,
             Name = r.Name,
             PostalCode = r.PostalCode,
             OpenTimes = r.OpenTimes,
             StreetAddress = r.StreetAddress
         });
     }
     return View(model);
 }