From b7aea2b2e28e6db30e796ba03eb1b90425bf7865 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 1 Apr 2025 20:17:26 +0800 Subject: [PATCH] Update split table DataE --- .../SqlSugar/Abstract/InsertableProvider/SplitInsertable.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/SplitInsertable.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/SplitInsertable.cs index 8a194fe5a..16a0b1a3e 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/SplitInsertable.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/SplitInsertable.cs @@ -129,7 +129,10 @@ namespace SqlSugar foreach (var item in groups) { var list = item.Select(it => it.Value as T).ToList(); + var dataEvent = this.Context.CurrentConnectionConfig.AopEvents?.DataExecuting; + this.Context.Aop.DataExecuting = null; var groupInserable = (InsertableProvider)this.Context.Insertable(list); + this.Context.Aop.DataExecuting = dataEvent; groupInserable.InsertBuilder.TableWithString = parent.InsertBuilder.TableWithString; groupInserable.RemoveCacheFunc = parent.RemoveCacheFunc; groupInserable.diffModel = parent.diffModel; @@ -150,7 +153,10 @@ namespace SqlSugar foreach (var item in groups) { var list = item.Select(it => it.Value as T).ToList(); + var dataEvent = this.Context.CurrentConnectionConfig.AopEvents?.DataExecuting; + this.Context.Aop.DataExecuting = null; var groupInserable = (InsertableProvider)this.Context.Insertable(list); + this.Context.Aop.DataExecuting = dataEvent; groupInserable.InsertBuilder.TableWithString = parent.InsertBuilder.TableWithString; groupInserable.RemoveCacheFunc = parent.RemoveCacheFunc; groupInserable.diffModel = parent.diffModel;