Browse Source

Add db.Ado.IsNoTran

SqlSugar5
sunkaixuan 2 years ago
parent
commit
a2763d13d8
  1. 4
      Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs
  2. 2
      Src/Asp.Net/SqlSugar/Interface/IAdo.cs

4
Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

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

2
Src/Asp.Net/SqlSugar/Interface/IAdo.cs

@ -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; }

Loading…
Cancel
Save