The repository pattern is a class in your Infrastructure layer that helps you implement your data’s persistence and it has lots of benefits in your code structure. For instance, makes easier unit testing, makes readable and clean code, and sends information to the database indirectly.
This is a complete article that you can find inside the Medium.com or even watch the video inside the Youtube.com