开发者

What is the use case of the generic ViewMasterPage<T>?

In ASP.NET MVC ther开发者_如何学JAVAe are generic master views (ViewMaserPage<T>). But what is the purpose of them? As I see it, generic argument of master view and "slave" view must be equal and this constraints me to using the same model for all my views.


You have abstract BaseViewModel which contain for example properties Title, Description, Keywords, ..., and all other view model classes inherits from BaseViewModel.


You can probably use a base type for your model as the generic argument for your master page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜