PerWebRequest Lifestyle missing in Castle Windsor 3.2

喜夏-厌秋 提交于 2019-12-24 10:56:34

问题


I was using PerWebRequest Lifestyle from Castle Windsor(version 3.0.0.4001). I wanted to update it to the latest version (3.2). In the latest version the, it says

does not contain a definition for 'PerWebRequest' and no extension method 'PerWebRequest' accepting a first argument of type 'Castle.MicroKernel.Registration.Lifestyle.LifestyleGroup<....

Below is how I was registering the Component, but with the latest version it throws error:

container.Register(Component.For<IUserRepository>().ImplementedBy<UserRepository>().LifeStyle.PerWebRequest);

Do I need to add any reference? Or can someone suggest which one of the Castle Windsor Lifestyle is recommended for a Web Application(where the Users use it for their daily activities like (Customer Maintenance))

来源:https://stackoverflow.com/questions/15630349/perwebrequest-lifestyle-missing-in-castle-windsor-3-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!