mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add unit test
This commit is contained in:
parent
bc17a0cd33
commit
a469c03dd7
@ -226,6 +226,20 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
throw new Exception("unit error");
|
throw new Exception("unit error");
|
||||||
}
|
}
|
||||||
|
var listxxxx = db.Queryable<SchoolA>()
|
||||||
|
.Includes(it => it.RoomList)
|
||||||
|
.LeftJoin<StudentA>((x, y) => (x.SchoolId == y.SchoolId))
|
||||||
|
//.LeftJoin<BookA>((x, y, z) => y.SchoolId == y.SchoolId)
|
||||||
|
.Select(x => new SchoolA()
|
||||||
|
{
|
||||||
|
SchoolId = 1,
|
||||||
|
SchoolName=x.SchoolName,
|
||||||
|
RoomList = x.RoomList
|
||||||
|
}).ToList();
|
||||||
|
if (!listxxxx.First().RoomList.Any())
|
||||||
|
{
|
||||||
|
throw new Exception("unit error");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UnitView01
|
public class UnitView01
|
||||||
|
Loading…
Reference in New Issue
Block a user