Browse Source

SimpleClient.GetPageListAsync

pull/2/head
skx 4 years ago
parent
commit
addfd14211
  1. 4
      Src/Asp.NetCore2/SqlSeverTest/SqlSugar/SimpleClient.cs

4
Src/Asp.NetCore2/SqlSeverTest/SqlSugar/SimpleClient.cs

@ -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…
Cancel
Save