Synecdoche means when we name
A thing by a part of the same,
As folks with no class
Say "a fine piece of ass"
When referring to all of the dame.

Metonymy's almost the same. 
It means when we give things the name
Of something related:
"A skirt that I dated"
Refers not to clothes but a dame.