|
@ -1,4 +1,5 @@ |
|
|
using System; |
|
|
using SqlSugar; |
|
|
|
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Text; |
|
|
using System.Text; |
|
@ -100,11 +101,11 @@ namespace OrmTest |
|
|
db.InsertNav(list.First()) |
|
|
db.InsertNav(list.First()) |
|
|
.ThenInclude(x => x.school_001) |
|
|
.ThenInclude(x => x.school_001) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.desk); |
|
|
.ThenInclude(x => x.desk).ExecuteCommand(); |
|
|
db.InsertNav(list.Last()) |
|
|
db.InsertNav(list.Last()) |
|
|
.ThenInclude(x => x.school_001) |
|
|
.ThenInclude(x => x.school_001) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.desk); |
|
|
.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() != 2) |
|
|
|| db.Queryable<School_004>().Count() != 2 || db.Queryable<Student_004>().Count() != 2) |
|
@ -116,11 +117,10 @@ namespace OrmTest |
|
|
|
|
|
|
|
|
db.InsertNav(list.First().school_001) |
|
|
db.InsertNav(list.First().school_001) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.desk); |
|
|
.ThenInclude(x => x.desk).ExecuteCommand(); |
|
|
db.InsertNav(list.Last().school_001) |
|
|
db.InsertNav(list.Last().school_001) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.rooms) |
|
|
.ThenInclude(x => x.desk); |
|
|
.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) |
|
|
{ |
|
|
{ |
|
|