Data Layer Best Practices

后端 未结 8 1282
甜味超标
甜味超标 2021-02-04 12:43

I am in the middle of a \"discussion\" with a colleague about the best way to implement the data layer in a new application.

One viewpoint is that the data layer should

8条回答
  •  你的背包
    2021-02-04 13:34

    In applications wherein we use NHibernate, the answer becomes "somewhere in between", in that, while the XML mapping definitions (they specify which table belongs to which object and which columns belong to which field, etc) are clearly in the business object tier.

    They are passed to a generic data session manager which is not aware of any of the business objects; the only requirement is that the business objects passed to it for CRUD have to have a mapping file.

提交回复
热议问题