Creating a data repository with generics and interfaces