Add entity validation on Repo functions and raise on adapter errors

Closes #26.