public static AccountEntry GetAccount(uint accountId) { lock (AuthDatabaseAccess.Lock) { GetAccountByIdCommand.Parameters["@AccountId"].Value = accountId; using (var reader = GetAccountByIdCommand.ExecuteReader()) return(AccountEntry.Read(reader)); } }
public static AccountEntry GetAccount(string accountName) { lock (AuthDatabaseAccess.Lock) { GetAccountByNameCommand.Parameters["@AccountName"].Value = accountName; using (var reader = GetAccountByNameCommand.ExecuteReader()) return(AccountEntry.Read(reader)); } }