Peel the asparagus on the lower half, cut into pieces 3-4 cm long, cook in boiling salted water for 5-10 minutes and let cool. (About 20 minutes for white asparagus.)
Wash the potatoes and cook them in their skins, briefly rinse with cold water, cut into thin slices. Cut the ham into small cubes.
Gently butter an ovenproof dish and place asparagus pieces, potato slices and ham into the dish in layers.
Season the crème fraîche with salt, pepper and pressed garlic and spread over the casserole. Finally sprinkle the grated cheese over it.
Bake in a preheated oven at 180 - 200 degrees for about 20 to 25 minutes.