阅读背景:

何时在ASP.NET MVC中使用Presentation Model?

来源:互联网 

Imagine a blog engine in ASP.NET MVC where I want strongly-typed Views. I have a Model for BlogPost and a Model for Comments. A typical page would display a blog post and all of that post's comments. What object should I pass to the View()? Should I create a Presentation Model? Maybe I'm using that term incorrectly, but by that I mean should I create a composite model just for a View(), something like BlogAndComments? Should my controller create an instance of BlogAndComments and pas that?Imagine a blog engine in ASP.NET MVC where I wa




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

分享到: