mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
-
This commit is contained in:
parent
a029e15696
commit
fcf522cdc6
@ -141,6 +141,7 @@
|
|||||||
<Compile Include="OldTest\UnitTest\Setting\MapTable.cs" />
|
<Compile Include="OldTest\UnitTest\Setting\MapTable.cs" />
|
||||||
<Compile Include="OldTest\UnitTest\Update.cs" />
|
<Compile Include="OldTest\UnitTest\Update.cs" />
|
||||||
<Compile Include="UnitTest\UAdo.cs" />
|
<Compile Include="UnitTest\UAdo.cs" />
|
||||||
|
<Compile Include="UnitTest\UQueryableAsync.cs" />
|
||||||
<Compile Include="UnitTest\UThread3.cs" />
|
<Compile Include="UnitTest\UThread3.cs" />
|
||||||
<Compile Include="UnitTest\UThread2.cs" />
|
<Compile Include="UnitTest\UThread2.cs" />
|
||||||
<Compile Include="UnitTest\UValidate.cs" />
|
<Compile Include="UnitTest\UValidate.cs" />
|
||||||
|
@ -27,6 +27,7 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
Json();
|
Json();
|
||||||
Ado();
|
Ado();
|
||||||
|
QueryableAsync();
|
||||||
Thread();
|
Thread();
|
||||||
Thread2();
|
Thread2();
|
||||||
Thread3();
|
Thread3();
|
||||||
|
18
Src/Asp.Net/SqlServerTest/UnitTest/UQueryableAsync.cs
Normal file
18
Src/Asp.Net/SqlServerTest/UnitTest/UQueryableAsync.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using SqlSugar;
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
public partial class NewUnitTest
|
||||||
|
{
|
||||||
|
public static void QueryableAsync()
|
||||||
|
{
|
||||||
|
RefAsync<int> total = 0;
|
||||||
|
Task t=Db.Queryable<Order>().ToPageListAsync(1, 2, total);
|
||||||
|
t.Wait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -998,7 +998,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public async Task<List<T>> ToPageListAsync(int pageIndex, int pageSize, RefAsync<int> totalNumber)
|
public async Task<List<T>> ToPageListAsync(int pageIndex, int pageSize, RefAsync<int> totalNumber)
|
||||||
{
|
{
|
||||||
totalNumber = await this.Clone().CountAsync();
|
totalNumber.Value = await this.Clone().CountAsync();
|
||||||
return await this.Clone().ToPageListAsync(pageIndex, pageSize);
|
return await this.Clone().ToPageListAsync(pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
public async Task<string> ToJsonAsync()
|
public async Task<string> ToJsonAsync()
|
||||||
@ -1023,7 +1023,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public async Task<string> ToJsonPageAsync(int pageIndex, int pageSize, RefAsync<int> totalNumber)
|
public async Task<string> ToJsonPageAsync(int pageIndex, int pageSize, RefAsync<int> totalNumber)
|
||||||
{
|
{
|
||||||
totalNumber = await this.Clone().CountAsync();
|
totalNumber.Value = await this.Clone().CountAsync();
|
||||||
return await this.Clone().ToJsonPageAsync(pageIndex, pageSize);
|
return await this.Clone().ToJsonPageAsync(pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
public async Task<DataTable> ToDataTableAsync()
|
public async Task<DataTable> ToDataTableAsync()
|
||||||
@ -1050,7 +1050,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public async Task<DataTable> ToDataTablePageAsync(int pageIndex, int pageSize, RefAsync<int> totalNumber)
|
public async Task<DataTable> ToDataTablePageAsync(int pageIndex, int pageSize, RefAsync<int> totalNumber)
|
||||||
{
|
{
|
||||||
totalNumber = await this.Clone().CountAsync();
|
totalNumber.Value = await this.Clone().CountAsync();
|
||||||
return await this.Clone().ToDataTablePageAsync(pageIndex, pageSize);
|
return await this.Clone().ToDataTablePageAsync(pageIndex, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user