I'm currently working on the project with the new team and they are using Repository pattern which is new to me. In this repository, they're currently doing
1.If we are offline, we will load data from file
2.Otherwise, we will make an api call to get data from server.
I did some researches and noticed that Repository is providing basic CRUD operations to local database. However, if we consider Repository acts like Data Access Layer, it can make an api call to retrieve data remotely as well.
Which one is the correct way to follow. Any ideas ?