Endometrial Biopsy.. Anyone do this yet?

Bethie • Pregnant after a miscarriage & chemical pregnancy
Went in today to talk to my doctor and he recommended doing this because where my periods are regular and I have gotten pregnant before I must be ovulating.  Thought this test might be a good idea. He also mentioned something about a dye test to look for a blockage? Looking for some advice.. TIA
 My husband is also going to have semen analysis done too