A hint to stop the whining sooner is to not give him attention when he does whine. Wait until he is quiet. That way you won't be rewarding the behavior and it will hopefully cease to exist

Good luck! Aren't beagle pups the cutest?!