Generic Repository for class