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