Is there a way to use NEST's AutoMap functionality with the Object Initializer Syntax?
According to the tutorial here, 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?
.Nested<PackageDependency>(nn => nn
.Name(pv => pv.Dependencies.First())
.AutoMap()
)
I've tried it like this:
new NestedProperty
{
Name = new PropertyName(nameof(PackageVersion.Dependencies))
}
But I can't find a property on the NestedProperty object that would corespond to AutoMap. The same goes for TextProperty, etc.
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.