internal void returnConnectionToPoolInternal() { // lock (UnitOfWork._iconnLock) // { if (UnitOfWork.uow.HasTransaction == false && UnitOfWork.uow.HasExplicitTransaction == false) { DbPool.FreeConnection(Convert.ToInt16(UnitOfWork.uow.PoolToken), out UnitOfWork.uow.PoolTokenValid); UnitOfWork.uow.PoolToken = null; } // } }
internal void CloseConnection() { try { // lock (UnitOfWork.iConnLock) // { if (UnitOfWork.uow.PoolToken != null) { UnitOfWork.uow.ClearIsolationLevel(); DbPool.FreeConnection(Convert.ToInt16(UnitOfWork.uow.PoolToken), out UnitOfWork.uow.PoolTokenValid); UnitOfWork.uow.PoolToken = null; } // } } catch (Exception ex) { throw ex; } }