From 4e8d6cce390f2a0be26f3a5b62a307a7bab33e30 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 19 May 2019 18:25:05 +0800 Subject: [PATCH] - --- .../SqlServerTest/UnitTest/UQueryableAsync.cs | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UQueryableAsync.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UQueryableAsync.cs index dc64f9d36..7ebce71e8 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UQueryableAsync.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UQueryableAsync.cs @@ -9,10 +9,35 @@ namespace OrmTest public partial class NewUnitTest { public static void QueryableAsync() + { + q1(); + q2(); + q3(); + } + + private static void q1() + { + RefAsync total = 0; + var count = Db.Queryable().Count(); + Task t = Db.Queryable().ToPageListAsync(1, 2, total); + t.Wait(); + UValidate.Check(count, total.Value, "QueryableAsync"); + } + private static void q2() + { + RefAsync total = 0; + var count = Db.Queryable().Count(); + Task t = Db.Queryable().ToDataTablePageAsync(1, 2, total); + t.Wait(); + UValidate.Check(count, total.Value, "QueryableAsync"); + } + private static void q3() { RefAsync total = 0; - Task t=Db.Queryable().ToPageListAsync(1, 2, total); + var count = Db.Queryable().Count(); + Task t = Db.Queryable().ToJsonPageAsync(1, 2, total); t.Wait(); + UValidate.Check(count, total.Value, "QueryableAsync"); } } }