Vagina hurts during sex

I had a yeast infection recently and the symptoms have gone away. but now whenever I have sex it hurts almost immediately during it and after when I pee. I don't know if I still have a yeast infection without any symptoms or I might not just be wet enough during sex. is there any way I could have given my boyfriend a yeast infection and he's giving it back to me during sex?