using System; using System.Collections.Generic; using System.Text; namespace Common.Entity { /// ///分页页面实体 /// public class PageEntity { private int _pagesize = 20; private int _page = 1; /// /// 当前页 /// public int Page { get { return _page; } set { _page = value < 1 ? 1 : value; } } /// /// 单页条数 /// public int Limit { get { return _pagesize; } set { _pagesize=value>100000 ? 100000 : value; } } /// /// 转换PageEntity /// /// 返回Page public PageEntity ToPageEntity() { return new PageEntity { Page = Page, Limit = Limit }; } } }