mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update unit test
This commit is contained in:
parent
ddb0335e76
commit
7be5aa65e1
@ -29,8 +29,9 @@ namespace OrmTest
|
||||
db.GetConnection("B").Insertable(new Role() { id=101, name="B"}).ExecuteCommand();
|
||||
db.GetConnection("AB").Insertable(new OptRole() { id=1, operId=10, roleId=101}).ExecuteCommand();
|
||||
|
||||
var x=db.Queryable<OperatorInfo>()
|
||||
.CrossQueryWithAttr().Includes(z => z.Roles).ToList();
|
||||
var x=db.QueryableWithAttr<OperatorInfo>()
|
||||
//.CrossQueryWithAttr()
|
||||
.Includes(z => z.Roles).ToList();
|
||||
|
||||
if (x.First().Roles.Count == 0)
|
||||
{
|
||||
|
@ -25,13 +25,13 @@ namespace OrmTest
|
||||
db.GetConnection("OrderItemDb").Insertable(new OrderItem() { OrderId = 1, CreateTime = DateTime.Now , Price=10 }).ExecuteCommand();
|
||||
|
||||
var list=db.QueryableWithAttr<OrderItem>()
|
||||
.CrossQueryWithAttr()
|
||||
// .CrossQueryWithAttr()
|
||||
.Includes(z => z.Order)
|
||||
.ToList();
|
||||
|
||||
|
||||
var list2 = db.QueryableWithAttr<Order>()
|
||||
.CrossQueryWithAttr()
|
||||
// .CrossQueryWithAttr()
|
||||
.Includes(z => z.Items)
|
||||
.ToList();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user