From Bulbapedia's Egg Move page:
In Sword and Shield, if two Pokémon of the same species are placed together in the Nursery and if one of the Pokémon has an empty move slot and the other knows an Egg Move, the Pokémon with the empty slot will learn the Egg Move. This will occur even if the Pokémon are the same gender.
Does this also work in Brilliant Diamond and Shining Pearl, or do I have to EV train a newly bred Azurill with Belly Drum and Aqua Jet?