/// <summary> /// 创建一个新的数据结果 /// </summary> /// <typeparam name="T">结果对象</typeparam> /// <param name="search">分页条件.</param> /// <param name="totalCount">总条数.</param> /// <param name="records">结果集.</param> public static PagedData <T> NewPagedData <T>(PagedSearch search, int totalCount, IEnumerable <T> records) { return(new PagedData <T>(search.PageNow, search.PageSize, totalCount, records ?? new T[] { })); }
/// <summary> /// 创建一个新的数据结果 /// </summary> /// <typeparam name="T">结果对象</typeparam> /// <param name="search">分页条件.</param> public static PagedData <T> NewPagedData <T>(PagedSearch search) { return(new PagedData <T>(search.PageNow, search.PageSize, 0, new T[] { })); }