I am trying to use the IOC pattern and could not find the perfect way of implementing the state management using the same. Would be great if someone can help me with the same. Thank you.
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
What I would do is first create an Interface containing all the properties you would need to store in the Session (i.e.: the context):
Then create a class that implements this interface, mark it as serializable:
And finally tell your IOC to bind the interface with the class at runtime an instantiate an object in HttpSession context. It looks like this with StrucureMap:
Hope that helps! |
|||
|
Unity
containers – saravanan May 12 at 12:17