mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update unit test
This commit is contained in:
parent
b7576ed2b9
commit
cb87c9b1e0
@ -80,7 +80,8 @@
|
|||||||
<Compile Include="Models\OrderItem.cs" />
|
<Compile Include="Models\OrderItem.cs" />
|
||||||
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
<Compile Include="Demo\Demo0_SqlSugarClient.cs" />
|
||||||
<Compile Include="Models\ViewOrder.cs" />
|
<Compile Include="Models\ViewOrder.cs" />
|
||||||
<Compile Include="UnitTest\Test01.cs" />
|
<Compile Include="UnitTest\UAopTest.cs" />
|
||||||
|
<Compile Include="UnitTest\UTest01.cs" />
|
||||||
<Compile Include="UnitTest\UEnum.cs" />
|
<Compile Include="UnitTest\UEnum.cs" />
|
||||||
<Compile Include="UnitTest\UFilter.cs" />
|
<Compile Include="UnitTest\UFilter.cs" />
|
||||||
<Compile Include="UnitTest\UInsert2.cs" />
|
<Compile Include="UnitTest\UInsert2.cs" />
|
||||||
|
@ -31,6 +31,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
|
||||||
Filter();
|
Filter();
|
||||||
Insert();
|
Insert();
|
||||||
Insert2();
|
Insert2();
|
||||||
@ -44,6 +45,7 @@ namespace OrmTest
|
|||||||
Queryable();
|
Queryable();
|
||||||
Queryable2();
|
Queryable2();
|
||||||
QueryableAsync();
|
QueryableAsync();
|
||||||
|
AopTest();
|
||||||
//Thread();
|
//Thread();
|
||||||
//Thread2();
|
//Thread2();
|
||||||
//Thread3();
|
//Thread3();
|
||||||
|
29
Src/Asp.Net/SqlServerTest/UnitTest/UAopTest.cs
Normal file
29
Src/Asp.Net/SqlServerTest/UnitTest/UAopTest.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
public partial class NewUnitTest
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void AopTest()
|
||||||
|
{
|
||||||
|
var db = Db;
|
||||||
|
db.CurrentConnectionConfig.ConfigureExternalServices = new SqlSugar.ConfigureExternalServices()
|
||||||
|
{
|
||||||
|
|
||||||
|
EntityNameService = (t, e) => {
|
||||||
|
|
||||||
|
e.DbTableName = "dbo." + e.DbTableName;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
db.Queryable<Order>().Select(it=> new {
|
||||||
|
x=SqlSugar.SqlFunc.Subqueryable<Order>().Select(s=>s.Id)
|
||||||
|
}).ToList();
|
||||||
|
db.CurrentConnectionConfig.ConfigureExternalServices = new SqlSugar.ConfigureExternalServices();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user