Unity PerRequestLifetimeManager re-using object in different requests
I've set up Unity for dependency injection for our project. The project itself is an ASP.NET application that uses both MVC and Web API. For the database context, I'm using the PerRequestLifetimeManager . This is done so that the different bits of business logic are using the same context (and thus the same transaction). In order to be able to use the PerRequestLifetimeManager , I've added references to the nuget packages Unity bootstrapper for ASP.NET MVC and Unity bootstrapper for ASP.NET Web API . For use of this lifetime manager in Web API, the following line has been added to the startup