Autofac and Web API Areas

I used to see this:

.InstancePerApiRequest(); 

Now I only got this:

 .InstancePerHttpRequest(); 

Did autofac remove the API scope? I have an Autofac.Integration.WebApi link, but this extension is not available. What is the difference between InstancePerHttpRequest and InstancePerApiRequest?

+4
source share
1 answer

InstancePerApiRequest is part of the Web API integration, and InstancePerHttpRequest is part of the MVC integration. They both actually apply the same tag to their lifetime span. This was done because you may have services that are dependencies on both the Web API and MVC.

+5
source

All Articles