Thrush

I went the dentist about two weeks ago and was told I had a fungal infection. They gave me a prescription but wouldn't tell me how I could have got it. I figured it out that it was probably from my boyfriend. From oral sex or making out. We reciprocate oral and make out often. It has cleared up and we didn't kiss or anything while I was taking it. What is the likelihood that I got it from/gave it to him? What would your recommendations be?

Sorry this is clunky I wasn't sure show best to phrase it.