title: Get wwwroot path when in ConfigureServices (aspnetcore)
body: <p>In my aspnetcore app (v2.1) I need to configure a read-only database (entityframework core + SQLite) which is in ~/wwwroot/App_Data/quranx.db</p>
  
  <p>I need to call this code in Startup.ConfigureServices</p>
  
  <pre><code>services.AddDbContext&lt;QuranXDataContext&gt;(options =&gt; options
      .UseSqlite($"Data Source={databasePath}")
      .UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking)
  );
  </code></pre>
  
  <p>But at that point I cannot find a way to get the path to wwwroot. To get that path I need <code>IHostingEnvironment</code>, but I am unable to get a reference to that until <code>Startup.Configure</code> is called, and that is after <code>Startup.ConfigureServices</code> has finished.</p>
  
  <p>How is this done?</p>