The Repository pattern abstracts data access behind a collection-like interface — separating business logic from how data is stored and retrieved. It decouples the application from data sources (databases, APIs), improving testability and maintainability.
Abin da Repository pattern ke yi
REPOSITORY → an abstraction layer between business logic and DATA ACCESS:
→ provides a clean interface (like a collection: findById, save, delete, findAll)
→ HIDES how/where data is actually stored (database, API, cache, files)
→ business logic uses the repository, NOT the database directly
→ separate WHAT data operations from HOW they're implemented
