阅读背景:

如何在MVC中创建通用视图模型?

来源:互联网 

I would like to use a viewmodel in MVC instead of using viewbag. Is there a way that I could create some generic viewmodel that's shared between all my controllers and then use this in my views? What kind of code would I need for this? I was thinking to maybe create something in a base controller. Is that possible?I would like to use a viewmodel in MVC instead




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: