From 26d8366f2f9be4244d1de6618e8c8bc9741bce28 Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Mon, 14 Jul 2025 20:56:21 -0700 Subject: [PATCH] Cleanup --- src/Server/Services/DatabaseService/Account.cs | 13 +++++-------- src/Server/Services/DatabaseService/Resume.cs | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Server/Services/DatabaseService/Account.cs b/src/Server/Services/DatabaseService/Account.cs index ca84844..ae527da 100755 --- a/src/Server/Services/DatabaseService/Account.cs +++ b/src/Server/Services/DatabaseService/Account.cs @@ -21,10 +21,7 @@ namespace BoredCareers.Services.DatabaseService { using( DbDataReader reader = await cmd.ExecuteReaderAsync() ) { while( await reader.ReadAsync() ) { - if( reader == null ) { - break; - } - + if( reader == null ) { break; } int _id = reader.GetInt32("ID"); string _username = reader.GetString("UserName"); string _email = reader.GetString("Email"); @@ -56,7 +53,7 @@ namespace BoredCareers.Services.DatabaseService { return account; } - public async Task GetAccount( int ID ) { + public async Task GetAccount( int AccountID ) { Account? account = null; using( MySqlConnection connection = GetConnection() ) { connection.Open(); @@ -67,7 +64,7 @@ namespace BoredCareers.Services.DatabaseService { "; MySqlCommand cmd = new MySqlCommand(command, connection); - cmd.Parameters.AddWithValue("@ID", ID); + cmd.Parameters.AddWithValue("@ID", AccountID); using( DbDataReader reader = await cmd.ExecuteReaderAsync() ) { while( await reader.ReadAsync() ) { @@ -144,7 +141,7 @@ namespace BoredCareers.Services.DatabaseService { } } - public async Task DeleteAccount( int ID ) { + public async Task DeleteAccount( int AccountID ) { using( MySqlConnection connection = GetConnection() ) { MySqlCommand cmd; connection.Open(); @@ -153,7 +150,7 @@ namespace BoredCareers.Services.DatabaseService { DELETE FROM Account WHERE ID = @ID; "; cmd = new MySqlCommand( command, connection ); - cmd.Parameters.AddWithValue("@ID", ID); + cmd.Parameters.AddWithValue("@ID", AccountID); await cmd.ExecuteNonQueryAsync(); } diff --git a/src/Server/Services/DatabaseService/Resume.cs b/src/Server/Services/DatabaseService/Resume.cs index f7155f3..f5e2895 100644 --- a/src/Server/Services/DatabaseService/Resume.cs +++ b/src/Server/Services/DatabaseService/Resume.cs @@ -218,7 +218,7 @@ namespace BoredCareers.Services.DatabaseService { } - public async Task DeleteResume( int ID ) { + public async Task DeleteResume( int ResumeID ) { using( MySqlConnection connection = GetConnection() ) { MySqlCommand cmd; connection.Open(); @@ -227,7 +227,7 @@ namespace BoredCareers.Services.DatabaseService { DELETE FROM Resume WHERE ID = @ID; "; cmd = new MySqlCommand( command, connection ); - cmd.Parameters.AddWithValue("@ID", ID); + cmd.Parameters.AddWithValue("@ID", ResumeID); await cmd.ExecuteNonQueryAsync(); }