How to use a Repository