Thrown away

You throw away the outside, cook the inside, eat the outside, throw away the inside. What am I?