From 4a85866fc286c296fcfab0c4062e33488c8d1120 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 13 Feb 2025 11:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=A4=A7=E9=87=91=E4=BB=93[SqlServer]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs index bda42b503..b96a4c949 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs @@ -361,6 +361,10 @@ namespace SqlSugar public override string ToString(MethodCallExpressionModel model) { var parameter = model.Args[0]; + if (IsSqlServerModel(model)) + { + return base.ToString(model); + } return string.Format(" CAST({0} AS VARCHAR)", parameter.MemberName); }