mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update ToPageListAsync(+1)
This commit is contained in:
parent
3d389abdef
commit
4f12f96c2b
@ -265,6 +265,13 @@ namespace OrmTest
|
||||
//}).ExecuteCommand();
|
||||
var d1111111111111 = db.Queryable<SqlSugarDemo.UserEntity>()
|
||||
.Mapper<SqlSugarDemo.UserEntity, SqlSugarDemo.RoleEntity, SqlSugarDemo.UserRoleEntity>(it => ManyToMany.Config(it.UserId, it.RoleId)).InSingle(data.UserId);
|
||||
RefAsync<int> x11 = 0;
|
||||
RefAsync<int> y1 = 0;
|
||||
db.Queryable<Order>().ToPageListAsync(1, 2, x11, y1).GetAwaiter().GetResult();
|
||||
if (x11.Value > 0 && y1.Value == 0)
|
||||
{
|
||||
throw new Exception("unit test error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -2122,10 +2122,10 @@ namespace SqlSugar
|
||||
this.Context.MappingTables = oldMapping;
|
||||
return await this.Clone().ToPageListAsync(pageIndex, pageSize);
|
||||
}
|
||||
public Task<List<T>> ToPageListAsync(int pageNumber, int pageSize, RefAsync<int> totalNumber, RefAsync<int> totalPage)
|
||||
public async Task<List<T>> ToPageListAsync(int pageNumber, int pageSize, RefAsync<int> totalNumber, RefAsync<int> totalPage)
|
||||
{
|
||||
var result = ToPageListAsync(pageNumber, pageSize, totalNumber);
|
||||
totalPage.Value = (totalNumber + pageSize - 1) / pageSize;
|
||||
var result =await ToPageListAsync(pageNumber, pageSize, totalNumber);
|
||||
totalPage.Value = (totalNumber.Value + pageSize - 1) / pageSize;
|
||||
return result;
|
||||
}
|
||||
public async Task<string> ToJsonAsync()
|
||||
|
Loading…
Reference in New Issue
Block a user