mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-27 03:09:34 +08:00
Synchronization code
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -9,9 +10,11 @@ namespace SqlSugar
|
||||
public interface ITenant
|
||||
{
|
||||
void BeginTran();
|
||||
void BeginTran(IsolationLevel iso);
|
||||
void CommitTran();
|
||||
void RollbackTran();
|
||||
Task BeginTranAsync();
|
||||
Task BeginTranAsync(IsolationLevel iso);
|
||||
Task CommitTranAsync();
|
||||
Task RollbackTranAsync();
|
||||
void ChangeDatabase(dynamic configId);
|
||||
|
||||
@@ -93,10 +93,18 @@ namespace SqlSugar
|
||||
{
|
||||
ScopedContext.BeginTran();
|
||||
}
|
||||
public void BeginTran(IsolationLevel iso)
|
||||
{
|
||||
ScopedContext.BeginTran(iso);
|
||||
}
|
||||
public Task BeginTranAsync()
|
||||
{
|
||||
return ScopedContext.BeginTranAsync();
|
||||
}
|
||||
public async Task BeginTranAsync(IsolationLevel iso)
|
||||
{
|
||||
await ScopedContext.BeginTranAsync(iso);
|
||||
}
|
||||
public void ChangeDatabase(dynamic configId)
|
||||
{
|
||||
ScopedContext.ChangeDatabase(configId);
|
||||
|
||||
Reference in New Issue
Block a user