title: How to get an instance of an injected service without constructor injection in ASP.NET Core?
body: <p>I have a three layered architecture.</p>
  <p>I can't use constructor injection and I need to get access to a service in my business code, in which I don't have access to <code>HttpContext</code>.</p>
  <p>For example, in action methods, or in filters or middleware I can get a service using:</p>
  <pre><code> HttpContext.RequestServices.GetRequiredService&lt;ITranslator&gt;();
  </code></pre>
  <p>But in my business code, I don't have access to <code>HttpContext</code>.</p>
  <p>How can I get an instance of my service?</p>
  <p><strong>Update</strong>:</p>
  <p>Here's my business code:</p>
  <pre><code>public class InvoiceBusiness
  {
     // for some reasons, I can't use constructor injection here
  
     public void CalculateTranslationsInvoice(long customerId) 
     {
         // I need to get an instance of ITranslator here, and a couple of other services. 
         // If this method was in a controller, I could use HttpContext.RequestServices. 
         // But here what should I do?
     }
  }
  </code></pre>