mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-30 04:45:54 +08:00
SimpleClient.GetPageListAsync
This commit is contained in:
parent
cb5053e537
commit
addfd14211
@ -189,10 +189,10 @@ namespace SqlSugar
|
||||
{
|
||||
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;
|
||||
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;
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user