Got it myself
I put this function in global_asax and called it from Application_start:
private void getConfig()
{
EFConfigRepository configRepository = new EFConfigRepository();
CConfigMasterBase config = null;
config = configRepository.Config
.FirstOrDefault();
System.Web.HttpContext.Current.Application["_Config"] = config;
}
Then called it like this from the cshtml:
@{
CConfigMasterBase config = new CConfigMasterBase();
config = (CConfigMasterBase)System.Web.HttpContext.Current.Application["_Config"];
}