This commit is contained in:
sunkaixuan 2019-05-05 13:03:30 +08:00
parent 579d5e5766
commit 914f6cae5f
4 changed files with 5 additions and 3 deletions

View File

@ -57,7 +57,7 @@ namespace SqlSugar
}
public virtual int CommandTimeOut { get; set; }
public virtual CommandType CommandType { get; set; }
public virtual bool IsEnableLogEvent { get; set; }
public virtual bool IsEnableLogEvent { get => this.Context.IsEnableLogEvent; set => this.Context.IsEnableLogEvent = value; }
public virtual bool IsClearParameters { get; set; }
public virtual Action<string, SugarParameter[]> LogEventStarting=> this.Context.LogEventStarting;
public virtual Action<string, SugarParameter[]> LogEventCompleted => this.Context.LogEventCompleted;

View File

@ -11,7 +11,7 @@ namespace SqlSugar
public AopProvider(SqlSugarContext context)
{
this.Context = context;
this.Context.Ado.IsEnableLogEvent = true;
this.Context.IsEnableLogEvent = true;
}
private SqlSugarContext Context { get; set; }
public Action<DiffLogModel> OnDiffLogEvent { set { this.Context.DiffLogEvent = value; } }

View File

@ -22,6 +22,8 @@ namespace SqlSugar
_Context = value;
}
}
public bool IsEnableLogEvent { get; set; }
public ConnectionConfig CurrentConnectionConfig { get; set; }
public Dictionary<string, object> TempItems { get; set; }
public bool IsSystemTablesConfig { get { return this.CurrentConnectionConfig.InitKeyType == InitKeyType.SystemTable; } }

View File

@ -22,7 +22,7 @@ namespace SqlSugar
IDataParameterCollection DataReaderParameters { get; set; }
CommandType CommandType { get; set; }
bool IsEnableLogEvent { get; set; }
bool IsDisableMasterSlaveSeparation { get; set; }
bool IsClearParameters { get; set; }
int CommandTimeOut { get; set; }