0

Is it bad to (below) every time the container changes with new apicontrollers:

//update webapi
                var resolver = new AutofacWebApiDependencyResolver(container);
                config.DependencyResolver = resolver;

Is there a better way to signal to the resolver that a change has been made in the container so that webapi see's the new controller?

I am loading new dlls which have new api controllers. I update them with a new builder: builder.Update(config) However at the moment this does not signal the resolver nor webapi to see the new controller. This works fine if the controllers are present at first, or if I run the code above.

At the moment I am doing self hosted webapi.

4

0 回答 0