How to inject custom dependence in custom entity?
How to inject custom dependence in custom entity?


You cannot; per the Services and dependency injection documentation:


  Note: It's not possible to inject services to entity object. See this issue for more details.


You'll have to get the service from \Drupal directly.