Browse Source

Add IsAnyTran

SqlSugar5
sunkaixuan 2 years ago
parent
commit
b9b86f9505
  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

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

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

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

Loading…
Cancel
Save