title: How do i get values from appsettings.json to BusinessLayer(my helper class) MVC 6
body: <p>My controller which returns user details by calling an API intern</p>
  
  <pre><code> public class HomeController : Controller
          {
              public ActionResult AccountDetails(int userId)
              {
                  return this.Content(new WebHelperService().GetAccountDetails(userId)), "application/json");
              }
          }
  </code></pre>
  
  <ol start="2">
  <li><p>Here is my  WebHelperService which is in <strong>Business Layer</strong>, where i need to <strong>get value from appsettings.json</strong></p>
  
  <pre><code>        public class WebHelperService
      {
          private string url = null;
          public WebHelperService()
          {
              //url = ConfigurationManager.ConnectionString["ExternalApiUrl"].ToString(); 
               // ConfigurationManager is not available in .net core.
              //So How do i read ExternalApiUrl from appsettings.josn,Which is the best way
          }
          public string GetAccountDetails(int userId)
          {
              return WebCall("{'userId':" + userId + "}");
          }
  
  
          private string WebCall(string data)
          {
              WebRequest request = WebRequest.Create(url);
             // get the data from url and returns it
          }
      }
  </code></pre>
  
  <ol start="3">
  <li>Do I need to carry settings all the way from controller in mvc6?
  Reference : <a href="https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/dependency-injection#accessing-settings-from-a-controller" rel="nofollow noreferrer">docs.microsoft.com/en-us/aspnet/core/mvc/con..</a>)</li>
  </ol></li>
  </ol>