using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Core.BaseRepository
{
public interface IUnitOfWorkManage
{
///
/// 获取SqlSugar数据库客户端实例
///
/// SqlSugarClient数据库客户端对象
SqlSugarClient GetDbClient();
int TranCount { get; }
///
/// 创建一个新的工作单元实例
///
/// 返回新创建的工作单元对象
UnitOfWork CreateUnitOfWork();
///
/// 开始一个事务
///
void BeginTran();
///
/// 开始一个事务
///
/// 触发事务的方法信息
void BeginTran(MethodInfo method);
///
/// 提交当前事务
///
void CommitTran();
///
/// 提交事务
///
/// 触发提交事务的方法信息
void CommitTran(MethodInfo method);
///
/// 回滚当前事务
///
void RollbackTran();
///
/// 回滚当前事务
///
/// 触发回滚的方法信息
void RollbackTran(MethodInfo method);
}
}