Meanwhile, cut the onion and ham into small pieces and drain the mushrooms.
Let the onions become translucent in hot oil, add the diced ham and mushrooms, mix well and steam for a short time.
Drain the spaetzle and place in a bowl. Add ham and mushrooms and stir. Stir in about half of the grated cheese, long, tasty cheese threads will form on the wooden spoon. Add the crème fraîche.
Pour the contents of the bowl into a baking dish and distribute evenly in the form. Scatter the rest of the cheese over the casserole. Bake in a preheated oven at 180 ° C for 20 minutes until the cheese is golden brown.
Finally sprinkle a pinch of oregano on top and serve.