How should I pass data between classes and application layers?

后端 未结 8 1698
太阳男子
太阳男子 2021-01-30 07:16

For example, if I am creating a 3 layer application (data / business / UI) and the data layer is grabbing single or multiple records. Do I convert everything from data layer in

8条回答
  •  情歌与酒
    2021-01-30 07:50

    I´d add a new layer, ORM Object Relational Mapping, with the responsability to transform data from Data layer into bussiness objects collections. I think that using objects in your bussiness model is the best practice.

提交回复
热议问题