问题
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