Binding a configuration to an object graph in .NET Core 2.0 : <p>I'm making a .NET Core 2.0 app and I need to configure it. I'm looking at <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?tabs=basicconfiguration#bind-to-an-object-graph" rel="noreferrer">this documentation</a> and it seems that in .NET Core 1.0 you could do:</p>

<pre><code>var appConfig = new AppSettings();
config.GetSection("App").Bind(appConfig);
</code></pre>

<p>And in .NET Core 1.1 you could do:</p>

<pre><code>var appConfig = config.GetSection("App").Get&lt;AppSettings&gt;();
</code></pre>

<p>But neither Bind nor Get exist in .NET Core 2.0. What's the new way to achieve this?</p>

<p>Thanks,</p>

<p>Josh</p>
