update Rest Resource handler to use models instead of repositories