Repository pattern ले data access लाई collection-जस्तो interface को पछाडि abstraction गर्छ — business logic लाई data कसरी store र retrieve गरिन्छ भन्ने कुरा बाट अलग गरेर। यसले application लाई data sources (databases, APIs) बाट decouple गर्छ, testability र maintainability सुधार गरेर।
Repository pattern के गर्छ
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
