Part implementation of repository pattern