Per Web Request is actually an “HttpContext request,” and under the cover, it caches instances using a dictionary HttpContext.Current.Items. This model, however, begins to break down quickly when you use the web API, which is caused by the asynchronous web API model and the fact that web API applications can work in (which means: no there HttpContext.Currentat all).
Simple Injector Web API. Perry API API , .
- , API ServiceStack?
ServiceStack , WebApiRequestLifestyle ExecutionContextScopeLifestyle. HttpRequest.Current ServiceStack, WebRequestLifestyle.