One of the major benefits of the repository pattern is that you can easily switch out implementations for other implementations.
After learning about this pattern I started to make tons of things into repositories like an
HttpClient repository for example, this way I can decide which client I want to use. Another example is a
NumberGenerator repository which can either be implemented with just random number generation, or other times it generates a number by looking something up on the web.
But then I needed to store things in the database so I was thinking of having something like this:
Repositories/ Number/ NumberGenerator/ NumberGeneratorContract RandomNumberGenerator NumberStore/ NumberStoreContract DbNumberStore
But that seems a little awkward, to have to call something a
store for storing it, if repository itself really means a place to store things.
Am I misusing the repository pattern?