Repository Pattern can be implemented using two ways.
In non-generic repository pattern each entity have its repository class. Lets take example if their is two entity classes like Customer & Employee then we need to create two different repository.
A generic repository class is used for all entity operations like insert, update & delete by single class.
Example of generic repository
Step 1- Create new interface IGenericRepository
Step 2- Add new class GenericRepository
Example how to call generic pattern.
In this example getting list of Designation by designationid.