Simplified the base controller getRepository method