In a large bowl put flour, sugar, margarine, baking powder and egg then mix everything well until a fluffy dough is formed.
Divide the dough into two equal parts, fold in cling film and refrigerate until the filling is ready.
Peel the apples.
Put the apples through the large grater and put them in a pan on low heat.
Add the sugar and cinnamon and cook the apples until the composition thickens. Allow to cool.
Grease an oven tray with a layer of margarine then line with flour.
Remove the dough from the fridge, spread a sheet and place it on the bottom of the tray, prick with a fork from place to place.
Put the hardened apples in the pan and level with a spoon.
Spread the other sheet and place it over the apple composition, prick with a fork from place to place and grease with a beaten egg.
Bake at 180C / 350F / gas 4 for 35-40 minutes or until a golden crust forms.
Let the pie "rest" for about 10 minutes then portion as desired, decorated with powdered sugar and ready to serve.