Add repository and entity manager