From d9b158bcfa3886cd3bc79976f551cd3c973bbf57 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 3 Mar 2023 18:36:55 +0800 Subject: [PATCH] Optimized code --- .../Abstract/InsertableProvider/ParameterInsertable.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/ParameterInsertable.cs b/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/ParameterInsertable.cs index 4a34f7424..d08ee8922 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/ParameterInsertable.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/ParameterInsertable.cs @@ -57,8 +57,12 @@ namespace SqlSugar this.Context.AddQueue("end \r\n"); result +=this.Context.SaveQueues(false); }); - if (this.Context.CurrentConnectionConfig.DbType == DbType.Oracle) - result=objects.Length; + //if (this.Context.CurrentConnectionConfig.DbType == DbType.Oracle) + // result=objects.Length; + if (result == -1) + { + result = objects.Length; + } return result; } public async Task DefaultExecuteCommandAsync()