Make or buy a pastry crust for a 9 inch (22 cm) pie pan. 190 C / 375 F / Gas Mark 5
Chop the onion.
Start heating oven to 190 C / 375 F / Gas Mark 5.
Melt in the butter in a medium-sized saucepan, then fry the onion for about 10 minutes at medium heat. Stir in the mustard and flour, then stir in the milk and simmer for 5 minutes or until thickened. Stir in the cheese and remove from the heat and let cool for 5 minutes.
Stir in the egg and the corn. Pour the mixture into the pie shell and cook until it is golden and set -- somewhere between ½ an hour and 40 minutes.
Notes
Corn kernels can be frozen or tinned. If frozen, thaw first (either by taking out ahead of time, giving them a quick zap in the microwave, or in a bowl of water well drained afterward).You can use butter or oil to fry the onion in.