I tried all sorts of expensive commercial concoctions in an attempt to keep my pups from digging in my flowerbeds, only to discover that most of the formulas wouldn't work for more than a few days per application if they did the job at all! However, I don't have such problems anymore. I've discovered a miraculous—and absolutely free—natural dog repellent, a substance that keeps the hounds away from my delicate blooms for months at a time: dog manure!
Most canines, you see, are relatively tidy by nature, and no self-respecting mutt will knowingly lie down in its own (or another dog's) waste.
Now you don't have to use great piles of the material (I'm not that eager to protect my plants). A little goes a long way. Simply scatter small pieces of dog droppings around the area you want to protect. Once you're done, it will be all but impossible for another person even to know that the flowerbeds (or whatever) have been treated ... but the pooches will figure it out right away, and they'll steer clear.
EDITOR'S NOTE: Don't spread dog droppings in a vegetable garden. You can, however, distribute some—thinly—around the borders of your cropping ground. They'll not only keep canines out, but will tend to deter rabbits and such too.