Reputation: 2449
What is the best practice with handling global, request in request, variables in ASP.NET MVC 3. What i need it for is configurations fetched from a database, that i want to make available throughout my MVC application, but the variables can change base on the request, so it need to be limited to the request scoop. The configurations variables are determent in a global action filter, so the way i handle it right now i simply to add the variables as request data, but i where hoping there is a better way to handle this.
Upvotes: 0
Views: 449
Reputation: 1038710
You could use HttpContext.Items
to store data that is available throughout the entire HTTP request.
Upvotes: 2