开发者

Recommended way to access Session object from views

I am storing "POCO" objects in the Session object. I need to access them from my view开发者_如何学运维s -strongly typed to use Intellisense.

I think my options are 1. ViewModel and 2. Singleton class. Do I have more options? How should I decide? Thank you.


Do this type of work in the controller. Grab whatever you need from the session and then convert to ViewModels.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜