/// <summary> /// ExecuteCommandReaderAsync /// </summary> /// <param name="Transaction"></param> /// <param name="dbName"></param> /// <param name="dbCommand"></param> /// <param name="useMaster"></param> /// <returns></returns> /// <exception cref="DatabaseException"></exception> public Task <IDataReader> ExecuteCommandReaderAsync(IDbTransaction?Transaction, string dbName, IDbCommand dbCommand, bool useMaster = false) { if (Transaction == null) { return(MySQLExecuter.ExecuteCommandReaderAsync(GetConnectionString(dbName, useMaster), dbCommand)); } else { return(MySQLExecuter.ExecuteCommandReaderAsync((MySqlTransaction)Transaction, dbCommand)); } }
/// <summary> /// ExecuteCommandReaderAsync /// </summary> /// <param name="Transaction"></param> /// <param name="dbName"></param> /// <param name="engineCommand"></param> /// <param name="useMaster"></param> /// <returns></returns> /// <exception cref="DatabaseException"></exception> public async Task <IDataReader> ExecuteCommandReaderAsync(IDbTransaction?Transaction, string dbName, EngineCommand engineCommand, bool useMaster = false) { using MySqlCommand command = CreateTextCommand(engineCommand); if (Transaction == null) { return(await MySQLExecuter.ExecuteCommandReaderAsync(GetConnectionString(dbName, useMaster), command).ConfigureAwait(false)); } else { return(await MySQLExecuter.ExecuteCommandReaderAsync((MySqlTransaction)Transaction, command).ConfigureAwait(false)); } }