public IUnitOfWorkCompleteHandle Begin(UnitOfWorkOptions options) { var uow = _iocResolver.Resolve<IUnitOfWork>(); uow.Completed += (sender, args) => { _currentUnitOfWorkProvider.Current = null; }; uow.Failed += (sender, args) => { _currentUnitOfWorkProvider.Current = null; }; uow.Disposed += (sender, args) => { _iocResolver.Release(uow); }; uow.Begin(options); _currentUnitOfWorkProvider.Current = uow; return uow; }
public void Begin(UnitOfWorkOptions options) { PreventMultipleBegin(); BeginUow(); }