public ActionResult GetByPrice(string category, decimal startPrice, decimal endPrice, int page) { if (page < 0) { page = 1; } int totalTour = _tourRepository.GetByPrice(category, startPrice, endPrice).Count(); var totalPage = (int)Math.Ceiling(totalTour / (double)size); ViewBag.TotalPage = totalPage; ViewBag.CurrentPage = page; ViewBag.CurrentCategory = category; var tours = _tourRepository.GetToursByPriceWithPaging(category, startPrice, endPrice, page, size); return(View(tours)); }