Looking at the history of the mentioned files, they haven't changes for two and three years so i wouldn't worry too much about that :)
I would prob. look at HttpContext.Current.Items instead of Session if you only need to have shared objects for the lifecycle of a single request. Maybe a static class with properties like
I would prob. look at HttpContext.Current.Items instead of Session if you only need to have shared objects for the lifecycle of a single request. Maybe a static class with properties like
public static class RequestContext
{
public static RequestContext Current
{
get { return HttpContext.Current.Items["RequestContext"]; }
set { HttpContext.Current.Items["RequestContext"] = value; }
}
public static object DbReader { get; set; }
public static object Something { get; set; }
}
And at any point in your razor-code you can then do@RequestContext.Current.Something