1.注入
private readonly IUnitOfWorkManager unitOfWorkManager;
2.构造
3.开启新事物
using (var unitOfWork = unitOfWorkManager.Begin(TransactionScopeOption.RequiresNew))
{
//todo someting
unitOfWork.Complete();
}
2024-01-24 15:54:34
1.注入
private readonly IUnitOfWorkManager unitOfWorkManager;
2.构造
3.开启新事物
using (var unitOfWork = unitOfWorkManager.Begin(TransactionScopeOption.RequiresNew))
{
//todo someting
unitOfWork.Complete();
}