mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Update unit test
This commit is contained in:
@@ -125,6 +125,16 @@ namespace OrmTest
|
||||
{
|
||||
throw new Exception("unit error");
|
||||
}
|
||||
var id = db.Queryable<School_002>().ToList().Last().scid;
|
||||
db.DeleteNav<School_002>(s => s.scid == id)
|
||||
.Include(it => it.rooms)
|
||||
.ThenInclude(it=>it.desk).ExecuteCommand();
|
||||
|
||||
if (db.Queryable<Desk_002>().Count() != 2 || db.Queryable<Room_002>().Count() !=2
|
||||
|| db.Queryable<School_002>().Count() != 1|| db.Queryable<Student_002>().Count() != 0)
|
||||
{
|
||||
throw new Exception("unit error");
|
||||
}
|
||||
}
|
||||
|
||||
public class Student_002
|
||||
|
@@ -68,6 +68,11 @@ namespace OrmTest
|
||||
.Include(x=>x.books)
|
||||
.Include(x=>x.school_001)
|
||||
.ExecuteCommand();
|
||||
|
||||
var id = db.Queryable<Student_004>().ToList().Last().sid;
|
||||
db.DeleteNav<Student_004>(s => s.sid == id)
|
||||
.Include(it => it.books)
|
||||
.Include(it=>it.school_001).ExecuteCommand();
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user