public async Task <IActionResult> Index(RestaurantsSearchViewModel restaurantSearchVm) { if (ModelState.IsValid) { var restaurantSearchResultsDto = await _restaurantsService.GetRestaurantsByPostCode(restaurantSearchVm.Postcode, restaurantSearchVm.Page, restaurantSearchVm.PageSize); restaurantSearchVm = BuildViewModel(restaurantSearchResultsDto); return(View(restaurantSearchVm)); } return(View(restaurantSearchVm)); }
public StaticPagedList <RestaurantViewModel> Resolve(RestaurantSearchResultsDto source, RestaurantsSearchViewModel destination, StaticPagedList <RestaurantViewModel> destMember, ResolutionContext context) { if (source.Restaurants == null) { return(default);