コード例 #1
0
 private void ProcceedAvailableTransactions(IInvocation invocation)
 {
     this._unitOfWorkAsync.BeginTransaction();
     try
     {
         invocation.Proceed();
     }
     catch (Exception ex)
     {
         _unitOfWorkAsync.Dispose();
         throw ex;
     }
     this._unitOfWorkAsync.Commit();
 }
コード例 #2
0
 private void ProcceesAvailableTransactions(IInvocation invocation, IUnitOfWorkOptions unitOfWorkOptions)
 {
     this._unitOfWorkAsync.BeginTransaction(unitOfWorkOptions);
     try
     {
         invocation.Proceed();
     }
     catch
     {
         _unitOfWorkAsync.Dispose();
         throw;
     }
     this._unitOfWorkAsync.Commit();
 }
コード例 #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _unitOfWork.Dispose();
     }
 }
コード例 #4
0
ファイル: BaseService.cs プロジェクト: lewerkun/Begium
 public virtual void Dispose()
 {
     if (null != unitOfWork)
     {
         unitOfWork.Dispose(true);
     }
 }
コード例 #5
0
 public void Dispose()
 {
     if (_uow != null)
     {
         _uow.Dispose();
     }
 }
コード例 #6
0
 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();
 }
コード例 #7
0
 /// <summary></summary>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _unitOfWorkAsync.Dispose();
     }
     base.Dispose(disposing);
 }
コード例 #8
0
        public void UnitofWork_Disposing()
        {
            mockDataContextAsync = new Mock <IDataContextAsync>();
            unitofWork           = new UnitOfWork(mockDataContextAsync.Object);
            bool disposing = true;

            unitofWork.Dispose(disposing);
        }
コード例 #9
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         // dispose managed resources
         _unitOfWork.Dispose();
     }
     // free native resources
 }
コード例 #10
0
 public void TestCleanup()
 {
     _unitOfWorkAsync.Dispose();
 }
コード例 #11
0
 public void UnitofWork_Dispose()
 {
     mockDataContextAsync = new Mock <IDataContextAsync>();
     unitofWork           = new UnitOfWork(mockDataContextAsync.Object);
     unitofWork.Dispose();
 }