Пример #1
0
        public JsonResult GetRestaurantPhotos(int parameter)
        {
            var photos =
                _restaurantPhotoTask.GetRestaurantPhotos(parameter)
                .Select(_mappingService.Map <RestaurantPhoto, RestaurantPhotoModel>)
                .Take(Helper.GetNumberOfRestaurantPhotosToShow()).ToList();

            if (!photos.Any())
            {
                photos.ToList().Add(new RestaurantPhotoModel
                {
                    PhotoSource = "Becky - No Image Icon.png"
                });
            }
            return(Json(photos));
        }
Пример #2
0
 public IEnumerable <RestaurantPhoto> GetRestaurantPhotos(int restaurantBranchId) => _restaurantPhotoTask.GetRestaurantPhotos(restaurantBranchId);