Update unit test

This commit is contained in:
sunkaixuan 2022-07-04 07:10:45 +08:00
parent 031661a78c
commit b38a058662
2 changed files with 4 additions and 6 deletions

View File

@ -76,7 +76,10 @@ namespace OrmTest
{ {
throw new Exception("unit error"); throw new Exception("unit error");
} }
db.DbMaintenance.TruncateTable<Student_002, School_002, Room_002, Desk_002>(); db.Deleteable<Student_002>().ExecuteCommand();
db.Deleteable<School_002>().ExecuteCommand();
db.Deleteable<Room_002>().ExecuteCommand();
db.Deleteable<Desk_002>().ExecuteCommand();
foreach (var item in list) foreach (var item in list)
{ {
item.sid = 0; item.sid = 0;

View File

@ -111,11 +111,6 @@ namespace OrmTest
.Include(x=>x.books).ExecuteCommand(); .Include(x=>x.books).ExecuteCommand();
db.InsertNav(list.Last()) db.InsertNav(list.Last())
.Include(x => x.school_001)
.ThenInclude(x => x.rooms)
.ThenInclude(x => x.desk)
.Include(x=>x.books).ExecuteCommand(); .Include(x=>x.books).ExecuteCommand();
} }