private void ProcceedAvailableTransactions(IInvocation invocation) { this._unitOfWorkAsync.BeginTransaction(); try { invocation.Proceed(); } catch (Exception ex) { _unitOfWorkAsync.Dispose(); throw ex; } this._unitOfWorkAsync.Commit(); }
private void ProcceesAvailableTransactions(IInvocation invocation, IUnitOfWorkOptions unitOfWorkOptions) { this._unitOfWorkAsync.BeginTransaction(unitOfWorkOptions); try { invocation.Proceed(); } catch { _unitOfWorkAsync.Dispose(); throw; } this._unitOfWorkAsync.Commit(); }
protected virtual void Dispose(bool disposing) { if (disposing) { _unitOfWork.Dispose(); } }
public virtual void Dispose() { if (null != unitOfWork) { unitOfWork.Dispose(true); } }
public void Dispose() { if (_uow != null) { _uow.Dispose(); } }
private void ProcceedAvailableTransactions(IInvocation invocation) { this._unitOfWorkAsync.BeginTransaction(); try { invocation.Proceed(); } catch (Exception ex) { _unitOfWorkAsync.Dispose(); throw ex; } //_unitOfWorkAsync.SaveChangesAsync().ConfigureAwait(false) //.GetAwaiter().GetResult(); this._unitOfWorkAsync.Commit(); }
/// <summary></summary> protected override void Dispose(bool disposing) { if (disposing) { _unitOfWorkAsync.Dispose(); } base.Dispose(disposing); }
public void UnitofWork_Disposing() { mockDataContextAsync = new Mock <IDataContextAsync>(); unitofWork = new UnitOfWork(mockDataContextAsync.Object); bool disposing = true; unitofWork.Dispose(disposing); }
protected virtual void Dispose(bool disposing) { if (disposing) { // dispose managed resources _unitOfWork.Dispose(); } // free native resources }
public void TestCleanup() { _unitOfWorkAsync.Dispose(); }
public void UnitofWork_Dispose() { mockDataContextAsync = new Mock <IDataContextAsync>(); unitofWork = new UnitOfWork(mockDataContextAsync.Object); unitofWork.Dispose(); }