Model repository to work with database