Inject entity_class into resources