BP59: Keep _Layout.cshtml as clean as possible
This file is usually one of the first things your new colleague will see.
The front-end developer is usually responsible for maintaining the layout of the application so the _Layout.cshtml should be simple to be understood.
Do not put large amounts of code into _Layout.cshtml. It the code is needed, put it to some helper class that will return model and program the _Layout.cshtml against such model then.