I would like to resolve a dependency using a named parameter in an MVC controller. If I can access the Autofac container I should be able to do it like so:
var service = Container.Resolve<IService>(
new NamedParameter("fileExtension", dupExt)
);
I can't find out how to access the AutoFac container. Is there a global reference to the container that I can use or is there another way to use named parameters?