What is a repository?

A repository is a class that lies somewhere between the controller and the database logic to make your application's service layers (including controllers) more lightweight and allows you to more easily re-use database logic in your application.

A pure repository implementation means that it is the gateway from your application logic to the database - only the repository knows how to read/write from/to the database, the rest of your application has to go through a repository to achieve persistence.