public async Task <ActionResult> Accommodations(int?page, int?pageSize) { int no = page ?? 1; int size = pageSize ?? 5; var ListofAccomodations = await _placeService.GetAccommodations(); IPagedList <GooglePlaceModel.Result> lst = null; lst = ListofAccomodations.results .ToPagedList <GooglePlaceModel.Result>(size, no); return(View(lst)); }
public async Task <IActionResult> Trips() { //Destinations var listOfDestinations = await _placeService.GetTopDestinations(); IQueryable <GooglePlaceModel.Result> desintations = null; desintations = listOfDestinations .AsQueryable(); //Accommodations var listofAccommodations = await _placeService.GetAccommodations(); IQueryable <GooglePlaceModel.Result> accommodations = null; accommodations = listofAccommodations.results .OrderBy(a => a.name) .AsQueryable(); //Bike Shops var listofShops = await _placeService.GetRentalStores(); IQueryable <GooglePlaceModel.Result> bikeShops = null; bikeShops = listofShops.results .AsQueryable(); var rv = new PlanATripViewModel { Destination = desintations, Accomadation = accommodations, BikeShops = bikeShops }; return(View(rv)); }