I want some code to execute on every page of my ASP .Net Core site. It's primarily setting session variables. I figured the best place to put it would be in _ViewStart.cshtml, but I don't have access to my dbcontext there. So my question is two-fold -- first, am I doing the wrong thing, is there a better place to put this code so that it executes on every page of the site? Second, how do I inject my dbcontext into _ViewStart.cshtml so I can do some database queries in the code there?