Raw sex= yeast infection??


So me and my bf had sex raw the other day and the next day I had a yeast infection... dose that happen all the time you have sex raw? Is there any way to avoid it and how do you tell your bf you have one?