Shorten asparagus spears by 2 to 3 cm, peel lightly if necessary. Place in water with juice of one lemon for three to four minutes to prevent discoloration.
Cook in a little salted water with half the butter and sugar until just tender. Cut off the lower part of the asparagus spears (about one third) and mash them with cream curd, onion and egg.
Drain the cooked asparagus well. Brush the gratin plate with the remaining butter, fill in the asparagus spears. Mix asparagus curd with cream and season with a little salt and pepper. Pour this glaze over the asparagus spears. Garnish with cheese and butter flakes and bake in the heated oven at 220 °C for five to ten minutes: the cheese should only take on a slight color.
Serve in the dish.
You can also cook this gratin in portion molds.