79162424

Date: 2024-11-06 11:42:13
Score: 1
Natty:
Report link

Firestore is used and repositories are the layer where I interact with such data is it right to have a division of them on the various features while still going to work on the same collections? (Different parts consisting of different features but touching the same collection of data). At the end of the work I might find several repository classes with the same code even though they belong to different features.

Giving up the ability to change the database engine, I treated repositories as part of the application layer, not the infrastructure. This allowed me to use the same repositories in many implementation contexts, thus avoiding such undesirable code duplication.

If you will not change the data source type and you know how to implement the solution without having to track changes, you can treat the repository as part of the application layer.

Furthermore, I use the dapper orm without linq support.

enter image description here enter image description here

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: user1785960