From d8a384b899c80647b9519fcd2da4a921b4ae1c92 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 27 Dec 2022 19:19:17 +0800 Subject: [PATCH] Add unit test --- Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs index dda84f403..16b2fc20a 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UnitSubToList.cs @@ -309,6 +309,15 @@ namespace OrmTest }) .ToList(); + var test7 = db.Queryable().Select(it => new + { + CustomId = it.CustomId, + OrderId = it.Id, + OrderName = it.Name, + disCount = SqlFunc.Subqueryable().Where(c => c.Id == it.CustomId|| c.Id == it.CustomId).ToList() + }) + .ToList(); + } private static void TestGetAll(SqlSugarClient db) {