Autofac in web applications, where should I store the container for easy access

Posted by michielvoo on Stack Overflow See other posts from Stack Overflow or by michielvoo
Published on 2009-03-13T21:50:07Z Indexed on 2010/05/18 3:00 UTC
Read the original article Hit count: 353

I'm still pretty new to using Autofac and one thing I miss in the documentation and examples is how to make it easy to get to the configured container from different places in a web application.

I know I can use the Autofac controller factory to automatically resolve constructor injected dependencies for controllers, but how about the other stuff you might need to resolve that is not injected yet.

Is there an obvious pattern I am not aware of for this?

Thank you!

© Stack Overflow or respective owner

Related posts about autofac

Related posts about dependency-injection