For the sauce
Preheat the oven to 180°C/350°F/Gas mark 4. Grease a 1.2 litre/2pt loaf tin with butter.
Mix the cod, onion, breadcrumbs, salt, eggs, sour cream and melted butter together in a large bowl. Scrape into the prepared loaf tin, and press down firmly. Bake in the oven for 45 minutes.
To make the sauce, sweat the onion in the butter until transparent. Add the flour and cook for 1 minute. Add the milk, lemon juice and mushrooms. Season with salt and pepper. Cook until the sauce thickens.
Add the sour cream to the sauce just before serving. Serve the fish loaf hot with the accompanying sauce.