How to set session scope for plugin in StructureMap 2.6?
In previous versions it is done this way:
For<ISomeObject>().CacheBy(StructureMap.InstanceScope.HttpSession).Use<SomeObject>();
However, Visual Studio displays a warning telling that the CacheBy
method is deprecated, and that LifecycleIs
method can be used instead.