From 4c6b34d1f7f43933166f588d7010ab5ea4fb321c Mon Sep 17 00:00:00 2001 From: aq982 Date: Tue, 4 Mar 2025 23:37:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=8D=E9=80=89=E7=BB=9F=E8=AE=A1=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=8D=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/template/service_Service.cs.vm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm index 2621b7c8..62c05cf7 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm @@ -289,10 +289,14 @@ if (@column.ColumnKey == "True"){ @:{ @: query = query.Having(string.Join(" AND ", aggregator.HavingConditions)); @:} + + @:// 执行查询 + @:return await query.Select<@(@Model.ClassName)Output>(string.Join(", ", selectParts)).ToListAsync(); + } + else + { + @:return await query.ToListAsync(); } - // 执行查询 - return await query.Select<@(@Model.ClassName)Output>(string.Join(", ", selectParts)) - .ToListAsync(); } @foreach (var column in Model.TableField){