在MVC,MVP和MVVM中,模型可以是实体的集合? [英] In MVC, MVP and MVVM the model could it be a collection of entities?
本文介绍了在MVC,MVP和MVVM中,模型可以是实体的集合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在MVC,MVP和MVVM的模型可以是实体的集合?
解决方案
绝对。一个模型就是描述业务逻辑使用的数据。
MVVM模型中通常由适当的ViewModel本身封装。您需要将模型图层与ViewModel分开,以防单个ViewModel可以处理不同的模型。
I try to understand what a Model is. I already read this answer.
In MVC, MVP and MVVM the model could it be a collection of entities?
解决方案
Absolutely. A Model is all what describes a data used by business logic.
Ofthen in MVVM Model is encapsulated by the appropriate ViewModel itself. You need to separate a Model layer from ViewModel in case when different models could be handled by a single ViewModel.
这篇关于在MVC,MVP和MVVM中,模型可以是实体的集合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文