What to return from the DAL to BLL

前端 未结 7 1935
不思量自难忘°
不思量自难忘° 2021-02-02 01:48

I currently have an application which consists of: User Interface (web page) BLL (Manager & Domain Objects) DAL (DataAccess class for each of my Domain Objects).

I u

相关标签:
7条回答
  • 2021-02-02 02:49

    BookDB should return the IBook instance. I like the repository pattern, which is all about mapping from the db to the domain.

    The repository implementation returns instances of the domain objects. This shields the rest of the code from the particular persistence implementation, which can be affected by the technology (database type, web service, [insert something else]) and the format used to save the data.

    0 讨论(0)
提交回复
热议问题