internal static ConnectionHandler CurrentHandler(string db) { if (db == null) { throw new PeanutException(DataMsg.CONNECTION_STRING_ERROR); } if (HandlerTable.ContainsKey(db)) { return(HandlerTable[db]); } return(null); }
/// <summary> /// 当前数据库连接 /// </summary> /// <param name="connName"></param> /// <returns></returns> internal static ConnectionHandler CurrentHandler(string connName) { if (string.IsNullOrEmpty(connName)) { throw new PeanutException(DataMsg.CONNECTION_STRING_ERROR); } CurrentConnectionName = connName; if (HandlerTable.ContainsKey(connName)) { return(HandlerTable[connName]); } return(null); }