From 105ad2c3ef78042f3f26451d2244cb5be7432026 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 4 Jul 2022 05:00:47 +0800 Subject: [PATCH] Update unit test --- Src/Asp.Net/SqlServerTest/UnitTest/UCustom012.cs | 5 ++--- Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs | 4 ++-- Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs | 8 ++++---- Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs | 8 ++++---- Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs | 8 ++++---- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UCustom012.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UCustom012.cs index e57f391f0..754e7d780 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UCustom012.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UCustom012.cs @@ -206,10 +206,9 @@ namespace OrmTest //开发中 db.InsertNav(list6) - .ThenInclude(z1 => z1.SchoolA) + .Include(z1 => z1.SchoolA) .ThenInclude(z1 => z1.RoomList) - .AsNav() - .ThenInclude(z1 => z1.Books).ExecuteCommand(); + .Include(z1 => z1.Books).ExecuteCommand(); } diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs index 510ce5e41..14c656233 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs @@ -78,11 +78,11 @@ namespace OrmTest } db.DbMaintenance.TruncateTable(); db.InsertNav(list.First()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs index 252af535b..3626ac74b 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs @@ -94,11 +94,11 @@ namespace OrmTest } } db.InsertNav(list.First()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); @@ -111,10 +111,10 @@ namespace OrmTest db.DbMaintenance.TruncateTable(); db.InsertNav(list.First().school_001) - .ThenInclude(x => x.rooms) + .Include(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last().school_001) - .ThenInclude(x => x.rooms) + .Include(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs index a08a5126f..926cf924a 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs @@ -94,11 +94,11 @@ namespace OrmTest } } db.InsertNav(list.First()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); @@ -111,10 +111,10 @@ namespace OrmTest db.DbMaintenance.TruncateTable(); db.InsertNav(list.First().school_001) - .ThenInclude(x => x.rooms) + .Include(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last().school_001) - .ThenInclude(x => x.rooms) + .Include(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs index 2c5f6d4b4..1269d0f43 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs @@ -99,11 +99,11 @@ namespace OrmTest } } db.InsertNav(list.First()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) - .ThenInclude(x => x.school_001) + .Include(x => x.school_001) .ThenInclude(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); @@ -116,10 +116,10 @@ namespace OrmTest db.DbMaintenance.TruncateTable(); db.InsertNav(list.First().school_001) - .ThenInclude(x => x.rooms) + .Include(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last().school_001) - .ThenInclude(x => x.rooms) + .Include(x => x.rooms) .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 0)