开发者

Castle Windsor lifestyle for web-service

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜