title: read connectionstring outside startup from appsetting.json in vNext
body: <p>I have a project class (Nuget Package). I need to read in a static class without constructor my connections string to MongoDB. </p>
  
  <p><strong>Static Class Method:</strong></p>
  
  <pre><code>        /// &lt;summary&gt;
          /// The default key MongoRepository will look for in the appsettings.json 
          /// &lt;/summary&gt;
          private const string DefaultConnectionstringName = "Data:MongoDB:MongoServerSettings";
  
          /// &lt;summary&gt;
          /// Retrieves the default connectionstring from appsettings.json
          /// &lt;/summary&gt;
          /// &lt;returns&gt;Returns the default connectionstring from the App.config or Web.config file.&lt;/returns&gt;
          public static string GetDefaultConnectionString()
          {
              var config = new Configuration();
              return config.Get&lt;string&gt;(DefaultConnectionstringName);
          }
  </code></pre>
  
  <p>I have always null... How can I obtain the value outside the Startup.cs without using DI?</p>
  
  <p>It is possible?</p>
  
  <p>In my old code I could do something like that:</p>
  
  <pre><code>/// &lt;summary&gt;
      /// Retrieves the default connectionstring from the App.config or Web.config file.
      /// &lt;/summary&gt;
      /// &lt;returns&gt;Returns the default connectionstring from the App.config or Web.config file.&lt;/returns&gt;
      public static string GetDefaultConnectionString()
      {
          return ConfigurationManager.ConnectionStrings[DefaultConnectionstringName].ConnectionString;
      }
  </code></pre>
  
  <p>Thanks!!</p>