Add db.Ado.IsNoTran

This commit is contained in:
sunkaixuan
2022-08-31 20:23:59 +08:00
parent b9b86f9505
commit a2763d13d8
2 changed files with 5 additions and 1 deletions

View File

@@ -187,6 +187,10 @@ namespace SqlSugar
{
return this.Transaction != null;
}
public virtual bool IsNoTran()
{
return this.Transaction == null;
}
public virtual void BeginTran()
{
CheckConnection();

View File

@@ -21,7 +21,7 @@ namespace SqlSugar
void ExecuteBefore(string sql, SugarParameter[] pars);
void ExecuteAfter(string sql, SugarParameter[] pars);
bool IsAnyTran();
bool IsNoTran();
bool IsEnableLogEvent{get;set;}
StackTraceInfo SqlStackTrace { get; }
IDataParameterCollection DataReaderParameters { get; set; }