I have implemented Repository pattern with Unit of work but have some architectural issues.
For example, lets say I am creating a used car parts online store. While I have operations on my DB I also have operations I need to perform on remote API's from different scrap yards e.g. need to run searches, availability updates and more...
I decided to try unit of work and repository pattern
Did things mostly like Mosh Hamedani but for asp.net core 2.1 From videos like this one
Unit of work and repositories work OK and make sense so long as I am using EF(or something else to communicate with DB) but it doesn't make much sense if I am to get some of the data trough different web apis. (e.g. getting list of cars on the market from different APIs whose handling and retrial is similar but different - I am retrieving different implementations of the same interface by key)
First I don't like the fact that I have all instances for all repositories inside my unit of work but need only one in most of the cases. I know it helps to reuse context transaction without wrapping it in my own but still its silly having unnecessary instances.
Second Should I implement retrieval logic and handling for remote api's also inside a repository and unit of work or maybe ditch unit of work and do something else? Keep just repositories? (Someone once mentioned facade pattern which I'm not familiar with)
I tend to overengineer things and right now I'm very confused. Any insight is helpful.