namespace System.Web.Mvc
{
    public interface IPagedList
    {
        int TotalPage //总页数
        {
            get;
        }        int TotalCount
        {
            get;
            set;
        }        int PageIndex
        {
            get;
            set;
        }        int PageSize
        {
            get;
            set;
        }        bool IsPreviousPage
        {
            get;
        }        bool IsNextPage
        {
            get;
        }
    }
    public class PagedList<T> : List<T>, IPagedList
    {        public PagedList(IQueryable<T> source, int? pageIndex, int? pageSize)
        {
            pageIndex = pageIndex == null ? 1 : pageIndex;
            PageSize = PageSize == null ? 20 : PageSize;
            this.PageIndex = pageIndex.Value;
            this.PageSize = pageSize.Value;
            this.TotalCount = source.Count();
            this.AddRange(source.Skip((pageIndex.Value - 1) * pageSize.Value).Take(pageSize.Value));
        }
        #region IPagedList 成员        public int TotalPage
        {
            get { return (int)System.Math.Ceiling((double)TotalCount/PageSize) ;}
        }        public int TotalCount
        {
            get;
            set;
        }        public int PageIndex
        {
            get;
            set;
        }        public int PageSize
        {
            get;
            set;
        }        public bool IsPreviousPage
        {
            get { return PageIndex > 1; }
        }        public bool IsNextPage
        {
            get { return PageIndex * PageSize < TotalCount; }
        }        #endregion
    }
    public static class Pagination
    {
        public static PagedList<T> ToPagedList<T>(this IQueryable<T> source, int? pageIndex, int pageSize)
        {
            return new PagedList<T>(source, pageIndex, pageSize);
        }
        public static PagedList<T> ToPagedList<T>(this IQueryable<T> source, int? pageIndex)
        {
            return new PagedList<T>(source, pageIndex, 20);
        }
    }
}以上是写的分页功能,下面是调用代码
var model = information_Content_BLL.Get();
            if (!string.IsNullOrEmpty(keyWord))
            {
                model = model.Where(a => a.Title.Contains(keyWord));
            }
            return View(model);红色部分本应该是model.ToPagedList(pageIndex),
但是现在却怎么也出不来,请问是还需要其它的设置 吗,本人刚学mvc模式没多久