I have a list of somewh开发者_开发技巧at complex entity graphs representing video game reviews. I'm going to create separate navigation based on the graphs' properties - game title, platform name(s), genre. At the end, it will be Wiki-like.
What I'm wondering is this - should I do the work to grab this navigation info in my controller and store it all in a view model, or should I simply pass my list of graphs into the view, and manipulate it there? Does it matter, in this case?
IT is good convention to use a ViewModel when passing information to the views. ViewModel suggests a link to a View. In a perfect world then we would use 1 ViewModel per View
there is a great article by Jimmy Bogard (author of MVC 3 in Action) that could help here
精彩评论