We use the whole or the whole of to refer to complete single things and events that are countable and defined:
The whole performance was disappointing from start to finish. (or The whole of the performance was disappointing …)
When we can split up a thing into parts, we can use either whole or all with the same meaning:
You don’t have to pay the whole (of the) bill at once.
You don’t have to pay all (of) the bill at once.
She ate the whole orange.
She ate all of the orange.
We often use the whole of with periods of time to emphasise duration:
We spent the whole (of the) summer at the beach.