public IActionResult Old(int?pageNumber) { var guests = _guestService.GetOldRecord().Select(guest => new GuestIndexViewModel { Id = guest.Id, FirstName = guest.FirstName, LastName = guest.LastName, MobileNo = guest.MobileNo, RoomType = guest.RoomType, FromDate = guest.FromDate, ToDate = guest.ToDate, TotalCharges = Math.Round(guest.TotalCharges, 2) }).ToList(); int pageSize = 3; return(View(BookingListPagination <GuestIndexViewModel> .Create(guests, pageNumber ?? 1, pageSize))); }