mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
SimpleClient.GetPageListAsync
This commit is contained in:
@@ -189,10 +189,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return Context.Queryable<T>().SingleAsync(whereExpression);
|
return Context.Queryable<T>().SingleAsync(whereExpression);
|
||||||
}
|
}
|
||||||
public virtual Task<List<T>> GetPageListAsync(Expression<Func<T, bool>> whereExpression, PageModel page)
|
public async virtual Task<List<T>> GetPageListAsync(Expression<Func<T, bool>> whereExpression, PageModel page)
|
||||||
{
|
{
|
||||||
RefAsync<int> count = 0;
|
RefAsync<int> count = 0;
|
||||||
var result = Context.Queryable<T>().Where(whereExpression).ToPageListAsync(page.PageIndex, page.PageSize, count);
|
var result = await Context.Queryable<T>().Where(whereExpression).ToPageListAsync(page.PageIndex, page.PageSize, count);
|
||||||
page.PageCount = count;
|
page.PageCount = count;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user