Can I cook and freeze mushrooms?

I have a massive glut of them thanks to a mistake on an online order... was wondering if they can be cooked and frozen and if so whats the best way to cook and what to store them in? EG would frying be best and put into freezer bags or tubs? Or will it just not work at all?