mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
-
This commit is contained in:
parent
fcf522cdc6
commit
4e8d6cce39
@ -9,10 +9,35 @@ namespace OrmTest
|
|||||||
public partial class NewUnitTest
|
public partial class NewUnitTest
|
||||||
{
|
{
|
||||||
public static void QueryableAsync()
|
public static void QueryableAsync()
|
||||||
|
{
|
||||||
|
q1();
|
||||||
|
q2();
|
||||||
|
q3();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void q1()
|
||||||
{
|
{
|
||||||
RefAsync<int> total = 0;
|
RefAsync<int> total = 0;
|
||||||
Task t=Db.Queryable<Order>().ToPageListAsync(1, 2, total);
|
var count = Db.Queryable<Order>().Count();
|
||||||
|
Task t = Db.Queryable<Order>().ToPageListAsync(1, 2, total);
|
||||||
t.Wait();
|
t.Wait();
|
||||||
|
UValidate.Check(count, total.Value, "QueryableAsync");
|
||||||
|
}
|
||||||
|
private static void q2()
|
||||||
|
{
|
||||||
|
RefAsync<int> total = 0;
|
||||||
|
var count = Db.Queryable<Order>().Count();
|
||||||
|
Task t = Db.Queryable<Order>().ToDataTablePageAsync(1, 2, total);
|
||||||
|
t.Wait();
|
||||||
|
UValidate.Check(count, total.Value, "QueryableAsync");
|
||||||
|
}
|
||||||
|
private static void q3()
|
||||||
|
{
|
||||||
|
RefAsync<int> total = 0;
|
||||||
|
var count = Db.Queryable<Order>().Count();
|
||||||
|
Task t = Db.Queryable<Order>().ToJsonPageAsync(1, 2, total);
|
||||||
|
t.Wait();
|
||||||
|
UValidate.Check(count, total.Value, "QueryableAsync");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user