From 250dc0c23e0953c78d38f9849a49606c1aa595ba Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 3 Jul 2022 01:00:09 +0800 Subject: [PATCH] Update unit test --- Src/Asp.Net/SqlServerTest/SqlServerTest.csproj | 1 + Src/Asp.Net/SqlServerTest/UnitTest/Main.cs | 2 ++ Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs | 3 +++ 3 files changed, 6 insertions(+) diff --git a/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj b/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj index 3d31944fb..714869e54 100644 --- a/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj +++ b/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj @@ -139,6 +139,7 @@ + diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs b/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs index a9141f5a6..544ace992 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs @@ -31,6 +31,8 @@ namespace OrmTest } public static void Init() { + + UOneManyMany.init(); UNavDynamic111N.Init(); UCustomNavigate01.Init(); UCustom023.Init(); diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs index f5c07e84a..acded05f0 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs @@ -35,6 +35,7 @@ namespace OrmTest var list=db.Queryable() + .Includes(x => x.school_001, x => x.rooms) .Where(x=>x.school_001.rooms.Any(z=>z.rooms.Any())).ToList(); if (list.Count() !=2) @@ -43,6 +44,7 @@ namespace OrmTest } var list2 = db.Queryable() + .Includes(x => x.school_001, x => x.rooms) .Where(x => x.school_001.rooms.Any(z => z.roomName== "北大01室" && z.rooms.Any())).ToList(); @@ -54,6 +56,7 @@ namespace OrmTest } var list3 = db.Queryable() + .Includes(x=>x.school_001,x=>x.rooms) .Where(x => x.school_001.rooms.Any(z => z.roomName == "青华03室" && z.rooms.Any(c=>c.deskName== "青华03室_01"))).ToList();