Reputation: 4171
Let us suppose we are injecting instances of web-services via Castle Windsor. What is the scenario when I want to use Transient lifestyle for them or PerWebRequest one? What is the way to think? Thanks
Upvotes: 1
Views: 505
Reputation: 1535
If you want a new instance of a component every time you request one from the container, use Transient. If you want the same instance to be pulled from the container throughout the life of a single web request, use PerWebRequest.
Upvotes: 1