How is called DTO class that also access db?

狂风中的少年 提交于 2019-12-11 08:25:14

问题


The definition of DTO from Wikipedia is the following:

Data transfer object (DTO) is an object that carries data between processes. The difference between data transfer objects and business objects or data access objects is that a DTO does not have any behavior except for storage and retrieval of its own data (accessors and mutators). DTOs are simple objects that should not contain any business logic that would require testing.

If, instead, the class containing the Data is not used for data transfer and has also the methods for CRUD operation which should be the acronym of that kind of class?


回答1:


It's called Active Records.

And it's indeed a very bad idea using it, as explained about everywhere.



来源:https://stackoverflow.com/questions/22382352/how-is-called-dto-class-that-also-access-db

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!