title: Empty model in ASP.NET Web API
body: <p>I'm having trouble getting model binding to work in the newish ASP.NET Web API. </p>
  
  <p>I'm using jQuery to make my posts, and the client-side JavaScript looks like so:</p>
  
  <pre><code>function postJsonSettings() {
      return {
          type: 'POST',
          dataType: 'json',
          contentType: 'application/json; charset=utf-8',
          xhrFields: {
              withCredentials: true
          }
      };
  }
  
  function createCustomer(customer) {
      var settings = postJsonSettings();
      settings.data = JSON.stringify({ model: customer });
      return $.ajax(Payboard.Util.getAbsoluteUrl('/api/customers'), settings);
  }
  </code></pre>
  
  <p>The request that results looks like this:</p>
  
  <pre><code>POST /api/customers HTTP/1.1
  Host: dev.payboard.com
  Connection: keep-alive
  Content-Length: 89
  Accept: application/json, text/javascript, */*; q=0.01
  Origin: http://www.payboardapitest.com
  User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
  Content-Type: application/json; charset=UTF-8
  Referer: http://www.payboardapitest.com/
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: en-US,en;q=0.8
  </code></pre>
  
  <p>With a POST payload like this:</p>
  
  <pre><code>{"model":{"ExternalCustomerId":"6c5015c8-d04e-4309-a493-ec0355d1b3a0","Name":"asdfasdf"}}
  </code></pre>
  
  <p>The C# Web API method that gets called looks like so:</p>
  
  <pre><code>// POST api/customers
  public void Post([FromBody] CreateCustomerModel model)
  {
      // Do stuff
  }
  </code></pre>
  
  <p>With a CreateCustomerModel that looks like this:</p>
  
  <pre><code>public class CreateCustomerModel
  {
      [Required]
      public string ExternalCustomerId { get; set; }
  
      [Required]
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>The <code>CustomerController.Post()</code> method gets called, and the <code>model</code> itself isn't null, but the <code>ExternalCustomerId</code> and <code>Name</code> properties are.</p>
  
  <p>Is there something obvious that I'm doing wrong?</p>