just sow in a raised border, does not have to be that high to deter them and try growing strong smelling herbs or crops e.g garlic, onions near by. They can be grown in a greenhouse before the hot weather kicks in, its works for me.
Last year I grew the variety 'Resistafly', and it was the first time that I didn't have a problem with root fly.
I grew the variety 'Resistafly' last year for the first time, and it was also the first time that I didn't have a problem with root fly.
Last year I planted carrots in deep containers placed 15 to 18 inches above ground level. The fliies fly at less than this height. I had no problem with carrot fly at all