I created a REST service using WebAPI 2. I then created a Windows service to wrap the API.
In WebAPI project, there were a couple of places I was using HttpContext.Current.Items dictionary to persist some metadata (during authentication) to avoid a second call to the DB later on in the request.
From what I understand, HttpContext.Current does not exist in OWIN. What I am trying to figure out is how I should persist data for only one request cycle.
- Is there a way to do this out of the box or is there a library that would provide what I need?
- Should I just roll my own?