|
@ -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; |
|
|
} |
|
|
} |
|
|