コード例 #1
0
        public ActionResult ClosestRestaurants(double? latitude, double? longitude)
        {
            IEnumerable<RestaurantMapViewModel> restaurants = null;

            if (latitude != null && longitude != null)
            {
                restaurants = this.restaurants.GetClosest((double)latitude, (double)longitude, 1).To<RestaurantMapViewModel>().ToList();

                if (restaurants == null)
                {
                    return this.RedirectToAction("Index");
                }

                return this.PartialView("~/Views/GoogleMaps/_GoogleMapsListRestaurantsPartial.cshtml", restaurants);
            }

            return this.Redirect("/");
        }
コード例 #2
0
 public CategoryController(ICategoryService categories, IRestaurantUserService restaurants)
 {
     this.categories = categories;
     this.restaurants = restaurants;
 }
コード例 #3
0
 public RestaurantFilterController(IRestaurantUserService restaurants, ICategoryService categories)
 {
     this.restaurants = restaurants;
     this.categories = categories;
 }
コード例 #4
0
 public CategoryController(ICategoryService categories, IRestaurantUserService restaurants)
 {
     this.categories  = categories;
     this.restaurants = restaurants;
 }
コード例 #5
0
 public RestaurantController(IRestaurantUserService restaurants, ICommentService comments)
 {
     this.restaurants = restaurants;
     this.comments = comments;
 }
コード例 #6
0
 public EventController(IRestaurantUserService restaurants, IEventService events)
 {
     this.restaurants = restaurants;
     this.events = events;
 }