mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update ToPageListAsync(+1)
This commit is contained in:
parent
3d389abdef
commit
4f12f96c2b
@ -265,6 +265,13 @@ namespace OrmTest
|
|||||||
//}).ExecuteCommand();
|
//}).ExecuteCommand();
|
||||||
var d1111111111111 = db.Queryable<SqlSugarDemo.UserEntity>()
|
var d1111111111111 = db.Queryable<SqlSugarDemo.UserEntity>()
|
||||||
.Mapper<SqlSugarDemo.UserEntity, SqlSugarDemo.RoleEntity, SqlSugarDemo.UserRoleEntity>(it => ManyToMany.Config(it.UserId, it.RoleId)).InSingle(data.UserId);
|
.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;
|
this.Context.MappingTables = oldMapping;
|
||||||
return await this.Clone().ToPageListAsync(pageIndex, pageSize);
|
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);
|
var result =await ToPageListAsync(pageNumber, pageSize, totalNumber);
|
||||||
totalPage.Value = (totalNumber + pageSize - 1) / pageSize;
|
totalPage.Value = (totalNumber.Value + pageSize - 1) / pageSize;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public async Task<string> ToJsonAsync()
|
public async Task<string> ToJsonAsync()
|
||||||
|
Loading…
Reference in New Issue
Block a user