We can't really do this here... A repository is a lower level API than a service, in no circumstance should a repository have a reliance on a service. If you need to query against the entity repository then it should have a ctor dependency on that repository. Repositories should never call into the ApplicationContext singleton.

I'd have to assume there's probably a better way to get the stylesheet ID from within this repo.