From e250abf4c2a0b3d9ac95174276b8f3b8b6cd8b63 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 22 Nov 2018 00:40:32 +0800 Subject: [PATCH] - --- .../SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs | 3 ++- .../SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs index e02ff93d4..d8d89d15d 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs @@ -357,7 +357,8 @@ namespace SqlSugar parameters = new List(); diffModel.AfterDate = null; diffModel.Time = this.Context.Ado.SqlExecutionTime; - this.Context.Ado.DiffLogEvent(diffModel); + if (this.Context.Ado.DiffLogEvent != null) + this.Context.Ado.DiffLogEvent(diffModel); } } diff --git a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs index 707f92edf..dfb96df4d 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs @@ -562,7 +562,8 @@ namespace SqlSugar parameters = new List(); diffModel.AfterDate = GetDiffTable(sql, parameters); diffModel.Time = this.Context.Ado.SqlExecutionTime; - this.Context.Ado.DiffLogEvent(diffModel); + if (this.Context.Ado.DiffLogEvent != null) + this.Context.Ado.DiffLogEvent(diffModel); } }