Make the casserole: Melt the butter in a large Dutch oven over medium heat. Add the diced onion; cook, stirring, until softened, 7 to 10 minutes. Add the mushrooms; saute until softened and most of the liquid has evaporated, 10 minutes. Sprinkle in the flour; cook, stirring, 1 minute. Add the broth and half-and-half. Bring to a boil, then reduce the heat to medium low and simmer until thickened, about 5 minutes.
Bring a pot of salted water to a boil. Add the green beans and cook until crisp-tender, 7 to 10 minutes. Drain; shake off any excess water and add to the mushroom sauce. Cook, stirring occasionally, until the beans are very tender, 10 to 12 minutes. Season with salt and pepper.
Make the topping: Soak the sliced onion in the buttermilk, 5 minutes. Combine the flour and 1 teaspoon salt in a medium bowl. Heat 2 to 3 inches vegetable oil in a large pot until a deep-fry thermometer registers 350 degrees F. Working in batches, drain the onion, toss with the flour and shake off the excess, then fry until golden, 4 to 6 minutes. Drain on paper towels.
Transfer the green bean mixture to a 4-quart baking dish and top with the fried onion. (The casserole and topping can be made up to 2 hours ahead; refrigerate the casserole. Bring to room temperature; reheat at 350 degrees F, 30 minutes. Top with the fried onion; bake 5 more minutes.)
Photograph by Chris Court
Courtesy of Food Network Magazine