title: How to inject a scoped service into DbContext? Net Core
body: <p>I am building the multi tenant app and trying to get the data security working now.
  Unit tests of Context are working nice because I create the context with options and UserContext, but I am struggling to get it working in assembly as it needs userContext to be injected.</p>
  
  <p>I cannot use standard controller injection as with everything else, as if I have it, the context creation fails:</p>
  
  <pre><code>services.AddEntityFrameworkNpgsql()
                  .AddDbContext&lt;MultiTenantContext&gt;(o =&gt;
                      o.UseNpgsql(Configuration.GetConnectionString("DbContext")
  </code></pre>
  
  <p>I cannot or I do not know how to inject my UserContext this way... </p>