From 83e626cd18526ce0c77e3a8c686f59d5a943d0d3 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 5 Jul 2023 19:40:53 +0800 Subject: [PATCH] Synchronization code --- .../SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs index 5a6f95026..3c9b33245 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs @@ -169,15 +169,16 @@ namespace SqlSugar { tempequals = $"{SqlBuilder.SqlTranslationLeft}{{0}}{SqlBuilder.SqlTranslationRight}='{{1}}' "; } - if (this.Context.CurrentConnectionConfig.DbType == DbType.Oracle) + if (SqlBuilder.SqlParameterKeyWord==":") { + var isAutoToUpper =this.Context.CurrentConnectionConfig?.MoreSettings?.IsAutoToUpper??true; if (entityValue != null && UtilMethods.GetUnderType(entityValue.GetType()) == UtilConstants.DateType) { - andString.AppendFormat("\"{0}\"={1} ", primaryField.ToUpper(), "to_date('" + entityValue.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss") + "', 'YYYY-MM-DD HH24:MI:SS') "); + andString.AppendFormat("\"{0}\"={1} ", primaryField.ToUpper(isAutoToUpper), "to_date('" + entityValue.ObjToDate().ToString("yyyy-MM-dd HH:mm:ss") + "', 'YYYY-MM-DD HH24:MI:SS') "); } else { - andString.AppendFormat(tempequals, primaryField.ToUpper(), entityValue); + andString.AppendFormat(tempequals, primaryField.ToUpper(isAutoToUpper), entityValue); } } else if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL && (this.Context.CurrentConnectionConfig.MoreSettings == null || this.Context.CurrentConnectionConfig.MoreSettings?.PgSqlIsAutoToLower == true))