public IDbConnection BorrowObject(IDatabase db) { GenericObjectPool <IDbConnection> pool = GetOrCreatePool(db); IDbConnection conn = pool.BorrowObject(); if (db != null && db.Config.EnableLogConnectionPool == true) { db.LogHelper.Debug("-------------------BorrowObject IDbConnection:" + conn.GetHashCode() + "; status:" + conn.State); } return(conn); }