From f3d08a75631d51daf29005e3732b15cd0b4598b5 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 3 Jul 2022 03:24:51 +0800 Subject: [PATCH] Add unit test --- Src/Asp.Net/SqlServerTest/SqlServerTest.csproj | 1 + Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany 2.cs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj b/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj index 714869e54..d470c81eb 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/UOneManyMany 2.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany 2.cs index 1edecc81f..e5611fa26 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany 2.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany 2.cs @@ -107,6 +107,15 @@ namespace OrmTest { throw new Exception("unit error"); } + + db.DbMaintenance.TruncateTable(); + + db.InsertNav(list.First().school_001) + .ThenInclude(x => x.rooms) + .ThenInclude(x => x.desk); + db.InsertNav(list.Last().school_001) + .ThenInclude(x => x.rooms) + .ThenInclude(x => x.desk); } public class Student_002