//pagesize quyết định public PaginatedList <Domain.Entities.Area> GetAll(int pageIndex) { var query = _repository.Queryable(); List <Domain.Entities.Area> listArea = new List <Domain.Entities.Area>(); foreach (var item in query) { listArea.Add(item); } var pagin = new PaginatedList <Domain.Entities.Area>(listArea, listArea.Count, pageIndex, 10); pagin.GetPageData(); return(pagin); }