diff --git a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs index e5aec9502..453fe63bc 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs @@ -589,6 +589,10 @@ namespace SqlSugar db.Context = new SqlSugarProvider(db.ConnectionConfig); } var intiAop=db.Context.Aop; + if (db.Context.CurrentConnectionConfig.AopEvents == null) + { + db.Context.CurrentConnectionConfig.AopEvents = new AopEvents(); + } return db.Context; } public void ChangeDatabase(dynamic configId)