title: get data from App.config file in asp.net core 3.1
body: <p>I installed <a href="https://www.nuget.org/packages/System.Configuration.ConfigurationManager/" rel="nofollow noreferrer">System.Configuration.ConfigurationManager -Version 4.7.0</a> in one of my project that is as a class library project and then I added app.config file in it.</p>
  
  <p>I've applied ASP.NET Core 3.1 in my project.</p>
  
  <p>Now I want to get value of  section.</p>
  
  <p>For this purpose I did it like this:</p>
  
  <pre><code>namespace Alpha.Infrastructure.PaginationUtility
  {
     public class PagingInfo
     {
         public virtual int DefaultItemsPerPage { get; set; } = int.Parse(System.Configuration.ConfigurationManager.AppSettings["DefaultItemsPerPage"]);
     }
  }
  </code></pre>
  
  <p>But I got "<strong>ArgumentNullException: Value cannot be null</strong>" error!</p>
  
  <p>How can I solve this problem?</p>
  
  <p><strong>App.config file:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;appSettings&gt;
      &lt;add key="DefaultItemsPerPage" value="3"/&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>