Custom DateTime model binder in ASP.NET Core 1 (RTM)
<p>I'm writing and ASP.NET Core 1 application, which has a Web API Controller where supplier will post data.</p>

<p>This is a simplified version of the Model class to which I will bind the incoming data:</p>

<pre><code>public class Lead
{
    public int SupplierId { get; set; }
    public DateTime Date { get; set; }
}
</code></pre>

<p>The problem is that the dates will be posted with German formatting, for instance, <code>30.09.2016</code>. I do not want to set the global culture of the application to <code>de-DE</code> because a) I'm not German, and b) the rest of the application will work with ISO dates.</p>

<p>I've set to write a custom <code>IModelBinder</code> and, because it's apparently obligatory in ASP.NET Core MVC, an <code>IModelBinderProvider</code>.</p>

<p>Here's my implementation of the <code>IModelBinderProvider</code>:</p>

<pre><code>public class GermanDateTimeModelBinderProvider : IModelBinderProvider
{
    public IModelBinder GetBinder(ModelBinderProviderContext context)
    {
        if (context == null)
            throw new ArgumentNullException(nameof(context));

        if (!context.Metadata.IsComplexType &amp;&amp; 
                context.Metadata.ModelType == typeof(DateTime))
            return new GermanDateTimeBinder();

        return null;
    }
}
</code></pre>

<p>The problem is that my <code>IModelBinderProvider</code> is only being hit for the <code>Lead</code> class, i.e., <code>context.Metadata.ModelType == typeof(Lead)</code>.  </p>

<p>I would expect the model binder to see that we're not dealing with a <code>DateTime</code>, move on, and <em>then</em> come back for <em>every property of the <code>Lead</code> class</em>.<br>
This is apparently not the case, and my custom <code>IModelBinder</code> never get hit.</p>

<p>The reason I say that <code>IModelBinderProvider</code> appears to be obligatory no is that I've found no way of directly registering an <code>IModelBinder</code> into the MVC pipeline; I <strong>have</strong> to register an IModelBinderProvider instead:</p>

<pre><code>public void ConfigureServices(IServiceCollection services)
{
    // Add framework services.
    services.AddMvc(options =&gt;
    {
        options.ModelBinderProviders.Insert(0, new GermanDateTimeModelBinderProvider());
    });
}
</code></pre>

<p>How can I get ASP.NET Core MVC to apply my custom <code>DateTime</code> binder to the <code>Date</code> property of the <code>Lead</code> class? 
Is there maybe a way to skip the whole <code>IModelBinderProvider</code> business and use just an <code>IModelBinder</code>?</p>