How can pregnancy be prevented surgically?

When vas deferens in males are blocked surgically - sperm transfer will be prevented. When fallopian tubes are blocked, eggs will not be able to reach the uterus