Thanks for the detail answer. But to clear when I tell that the domain should be agnostic about persistence, I wanted to mean that the domain shouldn't know if the data is persisted or not. If the repository is defined in the domain, the domain is asumming that the data will be persisted, and if it defines an interface it means it will use in some moment, so the domain will decide when to persist the data. So the interface it makes the domain agnostic about technology, but not about if the data is persisted or not.
↧