Change database aop bug

This commit is contained in:
skx
2020-12-19 14:51:51 +08:00
parent cedd69a6e9
commit d6d7f1bab9

View File

@@ -553,6 +553,8 @@ namespace SqlSugar
if (this._IsOpen)
this.Open();
_Context.Ado.IsEnableLogEvent = isLog;
if (_CurrentConnectionConfig.AopEvents==null)
_CurrentConnectionConfig.AopEvents = new AopEvents();
}
public void ChangeDatabase(Func<ConnectionConfig, bool> changeExpression)
{
@@ -565,6 +567,8 @@ namespace SqlSugar
if (this._IsOpen)
this.Open();
_Context.Ado.IsEnableLogEvent = isLog;
if (_CurrentConnectionConfig.AopEvents == null)
_CurrentConnectionConfig.AopEvents = new AopEvents();
}
public void BeginTran()
{