Browse Source

Add unit test

pull/29/head
sunkaixuan 2 years ago
parent
commit
9c15899b0d
  1. 18
      Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs

18
Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs

@ -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)
{ {

Loading…
Cancel
Save