Creating a generic repository