diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs index 33a1013c9..5ddcccef2 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany2.cs @@ -125,6 +125,16 @@ namespace OrmTest { throw new Exception("unit error"); } + var id = db.Queryable().ToList().Last().scid; + db.DeleteNav(s => s.scid == id) + .Include(it => it.rooms) + .ThenInclude(it=>it.desk).ExecuteCommand(); + + if (db.Queryable().Count() != 2 || db.Queryable().Count() !=2 + || db.Queryable().Count() != 1|| db.Queryable().Count() != 0) + { + throw new Exception("unit error"); + } } public class Student_002 diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany5.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany5.cs index 980149e3c..73bbd0eac 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany5.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UOneManyMany5.cs @@ -68,6 +68,11 @@ namespace OrmTest .Include(x=>x.books) .Include(x=>x.school_001) .ExecuteCommand(); + + var id = db.Queryable().ToList().Last().sid; + db.DeleteNav(s => s.sid == id) + .Include(it => it.books) + .Include(it=>it.school_001).ExecuteCommand(); }