/// <summary> /// 分页获取分类列表 /// </summary> /// <typeparam name="TCategory">分类类型</typeparam> /// <returns>分类分页列表</returns> private static IDbPagedQuery <TCategory> GetCategories <TCategory>() where TCategory : CategoryBase { //获取分类数据源 IDbQuery <TCategory> categories = _container.List <TCategory>().Like(c => c.CategoryName, "%商"); //返回分类分页数据源 return(categories.PagingByDescending(c => c.CreatedTime, 10)); }