title: How to AutoMap Elasticsearch properties using NEST object initializer syntax
body: <p>Is there a way to use NEST's <code>AutoMap</code> functionality with the Object Initializer Syntax?</p>
  
  <p>According to the tutorial <a href="https://github.com/elastic/elasticsearch-net-example/tree/6.x-netcore" rel="nofollow noreferrer">here</a>, the Object Initializer Syntax is "fully supported throughout the client." So, using an example from the tutorial, how would I perform this mapping using the Object Initializer Syntax?</p>
  
  <pre><code>.Nested&lt;PackageDependency&gt;(nn =&gt; nn
      .Name(pv =&gt; pv.Dependencies.First())
      .AutoMap()
  )
  </code></pre>
  
  <p>I've tried it like this:</p>
  
  <pre><code>new NestedProperty
  {
      Name = new PropertyName(nameof(PackageVersion.Dependencies))
  }
  </code></pre>
  
  <p>But I can't find a property on the <code>NestedProperty</code> object that would corespond to <code>AutoMap</code>. The same goes for <code>TextProperty</code>, etc.</p>
  
  <p>If it's not possible, I'll just use the Fluent API Syntax - no problem. But I want to make sure I'm not missing something obvious.</p>