79128946

Date: 2024-10-26 16:12:25
Score: 2
Natty:
Report link

I understand that it is ok using repository and dao together. Consider the scenario: the app deals with data come from network and from local database. It makes sense to use repository and dao together. The app does not need to know wherenthe data come from. The repository tries to access the online data. On success, it stores these data locally as a cache. If the network is unavailable, the repository can recover the data from lical database. Theregore, it can use DAO to access the DB.

Reasons:
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: user24618785