Add IsAnyTran

This commit is contained in:
sunkaixuan
2022-08-31 20:13:45 +08:00
parent 333545eb14
commit b9b86f9505
2 changed files with 6 additions and 0 deletions

View File

@@ -183,6 +183,10 @@ namespace SqlSugar
#endregion
#region Transaction
public virtual bool IsAnyTran()
{
return this.Transaction != null;
}
public virtual void BeginTran()
{
CheckConnection();

View File

@@ -20,6 +20,8 @@ namespace SqlSugar
SqlSugarProvider Context { get; set; }
void ExecuteBefore(string sql, SugarParameter[] pars);
void ExecuteAfter(string sql, SugarParameter[] pars);
bool IsAnyTran();
bool IsEnableLogEvent{get;set;}
StackTraceInfo SqlStackTrace { get; }
IDataParameterCollection DataReaderParameters { get; set; }