Autofac FAQ: How to Work With and Troubleshoot Per-Request Lifetime Scopes

net comments edit

One of the most frequent StackOverflow questions we see for Autofac involves some confusion over how to deal with components in applications like MVC and Web API that support per-request dependencies.

To help folks out, I wrote up a fairly comprehensive document on the Autofac doc site addressing the various questions around per-request dependencies.

We’re still working on porting over the wiki content into the doc site. While that is going on, things are a little “split” between the two sites. If the content is on the doc site, go for that over the wiki. The doc site has content that’s a little more robust and detailed than the wiki had (which is part of the desire to move to the doc site).

Comments