From 20f9d33680597c38555c211c900c886bd6e48c1b Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 3 Jul 2022 16:55:07 +0800 Subject: [PATCH] Update unit test --- 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 | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs index 98c1e9558..510ce5e41 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany.cs @@ -80,11 +80,11 @@ namespace OrmTest db.InsertNav(list.First()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 2) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs index 0bc31a981..252af535b 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs @@ -96,11 +96,11 @@ namespace OrmTest db.InsertNav(list.First()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 2) @@ -112,10 +112,10 @@ namespace OrmTest db.InsertNav(list.First().school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last().school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 0) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs index 44417159a..a08a5126f 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany3.cs @@ -96,11 +96,11 @@ namespace OrmTest db.InsertNav(list.First()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 2) @@ -112,10 +112,10 @@ namespace OrmTest db.InsertNav(list.First().school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last().school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 0) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs index a227b45db..2c5f6d4b4 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany4.cs @@ -1,4 +1,5 @@ -using System; +using SqlSugar; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -100,11 +101,11 @@ namespace OrmTest db.InsertNav(list.First()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last()) .ThenInclude(x => x.school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 2) @@ -116,11 +117,10 @@ namespace OrmTest db.InsertNav(list.First().school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); + .ThenInclude(x => x.desk).ExecuteCommand(); db.InsertNav(list.Last().school_001) .ThenInclude(x => x.rooms) - .ThenInclude(x => x.desk); - + .ThenInclude(x => x.desk).ExecuteCommand(); if (db.Queryable().Count() != 4 || db.Queryable().Count() != 4 || db.Queryable().Count() != 2 || db.Queryable().Count() != 0) {