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