mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Add unit test
This commit is contained in:
@@ -251,6 +251,24 @@ namespace OrmTest
|
|||||||
throw new Exception("unit error");
|
throw new Exception("unit error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var test5 = db.Queryable<Order>().Where(it=>false).Select(it => new
|
||||||
|
{
|
||||||
|
CustomId = it.CustomId,
|
||||||
|
OrderId = it.Id,
|
||||||
|
OrderName = it.Name,
|
||||||
|
disCount = SqlFunc.Subqueryable<Custom>().Where(c => c.Id == it.CustomId).ToList()
|
||||||
|
})
|
||||||
|
.ToListAsync().GetAwaiter().GetResult();
|
||||||
|
|
||||||
|
var test6 = db.Queryable<Order>().Where(it => false).Select(it => new
|
||||||
|
{
|
||||||
|
CustomId = it.CustomId,
|
||||||
|
OrderId = it.Id,
|
||||||
|
OrderName = it.Name,
|
||||||
|
disCount = SqlFunc.Subqueryable<Custom>().Where(c => c.Id == it.CustomId).ToList()
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
}
|
}
|
||||||
private static void TestGetAll(SqlSugarClient db)
|
private static void TestGetAll(SqlSugarClient db)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user