Closed 15926391823 closed 3 years ago
Chloe 4.17.0版本不兼容问题。 4.15版本 PageInfo result = new PageInfo();
IQuery<TIn> query = db.Query<TIn>().Where(expWhere); query = orderByAsc ? query.OrderBy<K>(sort) : query.OrderByDesc<K>(sort); if (pageInfo == null || pageInfo.PageIndex == 0 || pageInfo.PageSize == 0) { result.List = query.ToList<TOut>(); } else { result.PageIndex = pageInfo.PageIndex; result.PageSize = pageInfo.PageSize; result.Total = query.Count(); result.TotalPage = (result.Total + result.PageSize - 1) / result.PageSize; result.List = query.TakePage<TOut>(pageInfo.PageIndex, pageInfo.PageSize).ToList<TOut>(); } return result;
没问标,升级4.17了,query.ToList();报错,看了下 已经没有了,query.TakePage(pageInfo.PageIndex, pageInfo.PageSize).ToList();也新增了TakePage参数,无法兼容4.15版本,我用的nuget包是4.17版本得,求解决方案
Chloe 4.17.0版本不兼容问题。 4.15版本 PageInfo result = new PageInfo();
没问标,升级4.17了,query.ToList();报错,看了下 已经没有了,query.TakePage(pageInfo.PageIndex, pageInfo.PageSize).ToList();也新增了TakePage参数,无法兼容4.15版本,我用的nuget包是4.17版本得,求解决方案