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;