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 #endregion
#region Transaction #region Transaction
public virtual bool IsAnyTran()
{
return this.Transaction != null;
}
public virtual void BeginTran() public virtual void BeginTran()
{ {
CheckConnection(); CheckConnection();

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

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

Loading…
Cancel
Save