Ingredients

1 1/2 lb. green beans, halved crosswise

kosher salt

7 tbsp. butter, divided

1 medium yellow onion, sliced into rings

8 oz. button mushrooms, trimmed and sliced

Freshly ground black pepper

5 tbsp. all-purpose flour

3 c. whole milk

1/2 c. cornstarch

kosher salt

1/2 tsp. baking powder

1/4 tsp. baking soda

1/4 tsp. cayenne pepper

1 c. all-purpose flour, divided

3/4 c. club soda, chilled

1 medium onion, sliced into 1/2"-thick rings

Vegetable oil for frying

Preparation

Step 1Make Green Beans: Preheat oven to 350°. Cook green beans in a large pot of boiling salted water until bright green, 6 to 8 minutes, transfer to an ice bath to cool, then drain.Step 2Meanwhile, in a large pot over medium-high heat, melt 2 tablespoons butter. Add onions and salt and cook, stirring often, until tender, about 5 minutes, then add mushrooms and salt and pepper and cook, stirring often, until brown and tender, 5 minutes more. Transfer onions and mushrooms to a large bowl, add green beans, and toss to combine.Step 3Melt remaining 5 tablespoons butter in same large pot, then add flour and cook, stirring constantly, until golden brown, about 2 minutes. Gradually whisk in milk and bring to a simmer, then cook until slightly thickened, about 4 minutes; season with salt. Pour sauce over green beans and mushrooms and toss to combine, then transfer to a 3-quart baking dish and cover with foil. Bake until warmed through and bubbling around the edges, about 20 minutes.Step 4Make Onion Rings: Meanwhile, whisk cornstarch, salt, baking powder, baking soda, cayenne, and ½ cup flour in a large bowl, then add club soda and whisk until smooth. Place remaining ½ cup flour in a separate bowl, add onions, and toss to coat.Step 5Fit a large heavy-bottomed pot with a deep-fry thermometer and heat oil to 350°. Working in batches, dip onion rings into batter and carefully lower into oil, being careful not to overcrowd the pot. Fry, turning occasionally, until golden brown, 2 to 3 minutes. Transfer to a wire rack set on a baking sheet and season with salt, then repeat with remaining onions.Step 6Top warm green bean casserole with onion rings just before serving.