mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-29 09:54:44 +08:00
Update unit test
This commit is contained in:
@@ -139,6 +139,7 @@
|
|||||||
<Compile Include="UnitTest\UDelete.cs" />
|
<Compile Include="UnitTest\UDelete.cs" />
|
||||||
<Compile Include="UnitTest\UFastest.cs" />
|
<Compile Include="UnitTest\UFastest.cs" />
|
||||||
<Compile Include="UnitTest\UConfig.cs" />
|
<Compile Include="UnitTest\UConfig.cs" />
|
||||||
|
<Compile Include="UnitTest\UOneManyMany.cs" />
|
||||||
<Compile Include="UnitTest\USplit.cs" />
|
<Compile Include="UnitTest\USplit.cs" />
|
||||||
<Compile Include="UnitTest\Models\TB_AdminUser.cs" />
|
<Compile Include="UnitTest\Models\TB_AdminUser.cs" />
|
||||||
<Compile Include="UnitTest\Models\TB_ClientConfig.cs" />
|
<Compile Include="UnitTest\Models\TB_ClientConfig.cs" />
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
UOneManyMany.init();
|
||||||
UNavDynamic111N.Init();
|
UNavDynamic111N.Init();
|
||||||
UCustomNavigate01.Init();
|
UCustomNavigate01.Init();
|
||||||
UCustom023.Init();
|
UCustom023.Init();
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ namespace OrmTest
|
|||||||
|
|
||||||
|
|
||||||
var list=db.Queryable<Student_001>()
|
var list=db.Queryable<Student_001>()
|
||||||
|
.Includes(x => x.school_001, x => x.rooms)
|
||||||
.Where(x=>x.school_001.rooms.Any(z=>z.rooms.Any())).ToList();
|
.Where(x=>x.school_001.rooms.Any(z=>z.rooms.Any())).ToList();
|
||||||
|
|
||||||
if (list.Count() !=2)
|
if (list.Count() !=2)
|
||||||
@@ -43,6 +44,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
var list2 = db.Queryable<Student_001>()
|
var list2 = db.Queryable<Student_001>()
|
||||||
|
.Includes(x => x.school_001, x => x.rooms)
|
||||||
.Where(x => x.school_001.rooms.Any(z =>
|
.Where(x => x.school_001.rooms.Any(z =>
|
||||||
z.roomName== "北大01室" &&
|
z.roomName== "北大01室" &&
|
||||||
z.rooms.Any())).ToList();
|
z.rooms.Any())).ToList();
|
||||||
@@ -54,6 +56,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
var list3 = db.Queryable<Student_001>()
|
var list3 = db.Queryable<Student_001>()
|
||||||
|
.Includes(x=>x.school_001,x=>x.rooms)
|
||||||
.Where(x => x.school_001.rooms.Any(z =>
|
.Where(x => x.school_001.rooms.Any(z =>
|
||||||
z.roomName == "青华03室" &&
|
z.roomName == "青华03室" &&
|
||||||
z.rooms.Any(c=>c.deskName== "青华03室_01"))).ToList();
|
z.rooms.Any(c=>c.deskName== "青华03室_01"))).ToList();
|
||||||
|
|||||||
Reference in New Issue
Block a user