title: Web API Put - Parameter passed is null
body: <p>I'm using Postman to test a PUT Web API method I have written, but no matter what I try the strongly typed parameter I pass (MyModel) is always null.</p>
  
  <p><strong>Controller Action</strong></p>
  
  <pre><code>[Route("api/myapiname/{id}/{name}")]
  [HttpPut]
  public HttpResponseMessage Put(int id, string name, MyModel mymodel)
  {
    *//Do stuff*
  }
  </code></pre>
  
  <p><strong>MyModel Class</strong></p>
  
  <pre><code>public class MyModel
  {
      public MyModel() { }
  
      private Boolean _b;
      public Boolean b { set { _b = value; } get { return _b; } }
  
      private String _comments;
      public String comments { set { _comments = value; } get { return _comments;              }}
  }
  </code></pre>
  
  <p><strong>URL</strong></p>
  
  <pre><code>http://localhost:37781/api/myapiname/123456/laura
  </code></pre>
  
  <p><strong>Postman</strong></p>
  
  <pre><code>PUT: URL above
  
  Headers: 
  Content-Type: application/json
  
  Body:
  {
  "MyModel":[{"b": true,"comments": "Comments go here"}]
  }
  </code></pre>
  
  <p>I have tried changing this line:</p>
  
  <pre><code>public HttpResponseMessage Put(int id, string name, MyModel mymodel)
  </code></pre>
  
  <p>to</p>
  
  <pre><code>public HttpResponseMessage Put(int id, string name, [FromBody]MyModel mymodel)
  </code></pre>
  
  <p>and changing the content-type on Postman to x-www-form-urlencoded and I've also tried changing the content passed to:
      =[{"b": true,"comments": "Comments go here"}]</p>
  
  <p>I've tried the various solutions offered on StackOverflow but nothing I try is working, can someone please help me?</p>