3 ms·
The second option is possible if you declare an abstract dependency (preferably just a contract like an interface) and make your persistence layer implement it.
by ellius 7y ago
The second option is possible if you declare an abstract dependency (preferably just a contract like an interface) and make your persistence layer implement it. I highly recommend "Clean Architecture" if you'd like to learn more about that approach.