public ActionResult Index(int page = 1) { if (userOperations.Authentication(User.Identity.Name) == true) { int pageSize = 5; BooksAuthorsModel booksAuthorsModel = dataOperations.GetAllBooks(page, pageSize, SortQuery, FilterQuery, ""); PageInfo pageInfo = new PageInfo() { PageNumber = page, PageSize = pageSize, TotalItems = dataOperations.GetCountRows() }; booksAuthorsModel.PageInfo = pageInfo; return(View(booksAuthorsModel)); } else { return(RedirectToAction("Login", "Account")); } }