First make the filling.
Peel, core and chop the apples. Put them in a small sauce pan. Add the lemon juice, margarine, cinnamon and sugar. Cook for a few minutes until the apple softens - but it should remain tender, not become apple sauce. Let it cool.
Unroll the pastry onto a lightly floured surface.
Using a 8/10 cm diameter mug or a small plate cut the pastry into 6 or 8 circles.
Fill half of the circles with apple pie filling, allowing a 2cm rim. (Do not overfill!)
Place a second circle on top of each then press down the edges with a mini fork, sealing the two pastry circles.
Cut a cross on top of each pie to allow the steam to escape.
Brush them with the beaten egg, if used, then sprinkle with cinnamon sugar.
Line the air fryer basket (or both if you have double baskets) with parchment paper or spray them with some oil. Place a batch of the apple pies in the air fryer basket(s), leaving enough space between them. Put the rest in the fridge on a plate.
Set the the air fryer to "bake" at 175°C (350 F) and bake the pies for about 7-8 minutes until golden brown.
Remove them from the basket and bake the remaining pies.
Serve the pies warm or at room temperature.