You can use Any() to check if a record exists. So if you wanted to check if a record exists with UserId of 99 you could do:
var doesExist = myContext.Table2.Any(m => m.UserId == 99);
That returns a bool. You can easily use that bool to set your button
button.Visible = !doesExist;
Edit for your comment:
After your done with your first query, go ahead and determine if the record exists, and then switch the button's visibility with the result.
For example if you have some method called DoWork that executes and populates your listbox:
void DoWork() {
... execute your first query
... populate your listbox
var doesExist = myContext.Table2.Any(m => m.UserId == 99);
yourButton.Visible = !doesExist;
}
I can't really say where exactly you should put this without seeing the rest of your code. But since you mentioned, "i want all the records in Table1 to be presented - and after that run some kind of if-statement to check if a record in the joined table exists or not, causing a button to either show or not", it's clear that it has to happen after your first query.