In a skillet, cook onion in butter slightly, for just about a minute.
Whisk in the flour and salt. Add milk gradually and cook until thick and bubbly. Remove from heat and stir in sour cream and beans.
Spread 1/3 of bean mixture in 1-quart casserole. Sprinkle 1/2 of the swiss cheese over the beans. Repeat layers, ending with the beans. Top with fried onions.
Bake for 20 minutes.
Notes
If you need to make more, this recipe can easily be doubled or even tripled and made in a 9x13 pan.