mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update unit test
This commit is contained in:
parent
ee11466d12
commit
105ad2c3ef
@ -206,10 +206,9 @@ namespace OrmTest
|
|||||||
|
|
||||||
//开发中
|
//开发中
|
||||||
db.InsertNav(list6)
|
db.InsertNav(list6)
|
||||||
.ThenInclude(z1 => z1.SchoolA)
|
.Include(z1 => z1.SchoolA)
|
||||||
.ThenInclude(z1 => z1.RoomList)
|
.ThenInclude(z1 => z1.RoomList)
|
||||||
.AsNav()
|
.Include(z1 => z1.Books).ExecuteCommand();
|
||||||
.ThenInclude(z1 => z1.Books).ExecuteCommand();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -78,11 +78,11 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
db.DbMaintenance.TruncateTable<Student_001, School_001, Room_001, Desk_001>();
|
db.DbMaintenance.TruncateTable<Student_001, School_001, Room_001, Desk_001>();
|
||||||
db.InsertNav(list.First())
|
db.InsertNav(list.First())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
db.InsertNav(list.Last())
|
db.InsertNav(list.Last())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
|
|
||||||
|
@ -94,11 +94,11 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
db.InsertNav(list.First())
|
db.InsertNav(list.First())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
db.InsertNav(list.Last())
|
db.InsertNav(list.Last())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
|
|
||||||
@ -111,10 +111,10 @@ namespace OrmTest
|
|||||||
db.DbMaintenance.TruncateTable<Student_002, School_002, Room_002, Desk_002>();
|
db.DbMaintenance.TruncateTable<Student_002, School_002, Room_002, Desk_002>();
|
||||||
|
|
||||||
db.InsertNav(list.First().school_001)
|
db.InsertNav(list.First().school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.Include(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
db.InsertNav(list.Last().school_001)
|
db.InsertNav(list.Last().school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.Include(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
|
|
||||||
if (db.Queryable<Desk_002>().Count() != 4 || db.Queryable<Room_002>().Count() != 4
|
if (db.Queryable<Desk_002>().Count() != 4 || db.Queryable<Room_002>().Count() != 4
|
||||||
|
@ -94,11 +94,11 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
db.InsertNav(list.First())
|
db.InsertNav(list.First())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
db.InsertNav(list.Last())
|
db.InsertNav(list.Last())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
|
|
||||||
@ -111,10 +111,10 @@ namespace OrmTest
|
|||||||
db.DbMaintenance.TruncateTable<Student_003, School_003, Room_003, Desk_003>();
|
db.DbMaintenance.TruncateTable<Student_003, School_003, Room_003, Desk_003>();
|
||||||
|
|
||||||
db.InsertNav(list.First().school_001)
|
db.InsertNav(list.First().school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.Include(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
db.InsertNav(list.Last().school_001)
|
db.InsertNav(list.Last().school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.Include(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
|
|
||||||
if (db.Queryable<Desk_003>().Count() != 4 || db.Queryable<Room_003>().Count() != 4
|
if (db.Queryable<Desk_003>().Count() != 4 || db.Queryable<Room_003>().Count() != 4
|
||||||
|
@ -99,11 +99,11 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
db.InsertNav(list.First())
|
db.InsertNav(list.First())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
db.InsertNav(list.Last())
|
db.InsertNav(list.Last())
|
||||||
.ThenInclude(x => x.school_001)
|
.Include(x => x.school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.ThenInclude(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
|
|
||||||
@ -116,10 +116,10 @@ namespace OrmTest
|
|||||||
db.DbMaintenance.TruncateTable<Student_004, School_004, Room_004, Desk_004>();
|
db.DbMaintenance.TruncateTable<Student_004, School_004, Room_004, Desk_004>();
|
||||||
|
|
||||||
db.InsertNav(list.First().school_001)
|
db.InsertNav(list.First().school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.Include(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
db.InsertNav(list.Last().school_001)
|
db.InsertNav(list.Last().school_001)
|
||||||
.ThenInclude(x => x.rooms)
|
.Include(x => x.rooms)
|
||||||
.ThenInclude(x => x.desk).ExecuteCommand();
|
.ThenInclude(x => x.desk).ExecuteCommand();
|
||||||
if (db.Queryable<Desk_004>().Count() != 4 || db.Queryable<Room_004>().Count() != 4
|
if (db.Queryable<Desk_004>().Count() != 4 || db.Queryable<Room_004>().Count() != 4
|
||||||
|| db.Queryable<School_004>().Count() != 2 || db.Queryable<Student_004>().Count() != 0)
|
|| db.Queryable<School_004>().Count() != 2 || db.Queryable<Student_004>().Count() != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user