As a new male dog owner, I have just one question:

Is it possible to train the dog to stay out of my gardens when going pee?

If so, how?