Patching a hole in drywall is a common home repair, but sanding the joint compound smooth before painting can create a lot of dust.
Instead of sanding the patch, consider using a drywall sponge. While it takes a bit longer than sanding, a drywall sponge greatly reduces the amount of dust in the air.
Start by dipping the sponge in warm water and wringing out the excess. Then, using the course side of the sponge, go over the drywall patch in a circular motion.
Rinse the sponge out in the bucket from time to time. As you keep going over it, the joint compound will soften and smooth out the patch. Once it dries, you can paint right over it.