Preheat the oven at 200 degrees Celsius.
Boil the macaroni according to the Instructions on the box.
Fry the sausages in a frying pan.
Peel and cut the onion in small pieces.
In a bowl mix the eggs, milk, pepper and salt.
Add in the macaroni and mix well.
Spread evenly the grated cheese on top.
Place in the middle of the oven for 30 minutes.
Take out the macaroni gratin from the oven and let it cool down for 10 minutes before serving it.