The definition of these terms is quite ambiguous. You will find different definitions at different places.
Entity: An entity represents a single instance of your domain object saved into the database as a record. It has some attributes that we represent as columns in our tables.
Model: A model typically represents a real world object that is related to the problem or domain space. In programming, we create classes to represent objects. These classes, known as models, have some properties and methods (defining objects behavior).
ViewModel: The term ViewModel originates from the MVVM (Model View ViewModel) design pattern. There are instances in which the data to be rendered by the view comes from two different objects. In such scenarios, we create a model class which consists of all properties required by the view. It’s not a domain model but a ViewModel because, a specific view uses it. Also, it doesn’t represent a real world object.
DataModel: In order to solve a problem, objects interact with each other. Some objects share a relationship among them and consequently, form a data model that represents the objects and the relationship between them.
相关文章
- 09-23在运行程序时报错:"如果在 Code First 模式下使用,则使用 T4 模板为 Database First 和 Model First 开发生成的代码可能无法 正常运行。若要继续使用 Database First 或 Model First,请确保在执行应用程序的 config 文件中指 定 Entity Framework 连接字符串。若要将这些从 Database First 或 Mod
- 09-23model.evaluate 和 model.predict 的区别
- 09-23Form、VO、DTO、BO、DO、Model的区别
- 09-23浅析领域驱动模型VO、DTO、BO、PO 等的概念及其区别
- 09-23VS2010中没有ado.net entity data model实体数据模型这一选项-解决办法
- 09-23.sync修饰符与v-model的区别
- 09-23VO、DTO、DO、PO的概念、区别和用处
- 09-23DO、VO、DTO 区别
- 09-23VO,PO,DTO,BO,POJO,DAO,ENtity分别的作用
- 09-23VO、DTO、POJO、PO的区别