Concept Flow - Repository pattern for data access
Start
Controller calls Repository
Repository handles data logic
Repository calls Database
Database returns data
Repository returns data to Controller
Controller sends response
End
The controller asks the repository for data. The repository talks to the database and returns data back. The controller then sends the response.