title: MVC 6 - cannot pass multiple JSON parameters to a controller anymore
body: <p>I have recently been working to use the new <code>ASP.NET 5</code> system, and Microsoft's <code>ASP.NET MVC 6</code>, but I am finding a few very key problems that are preventing me from going forward; Most notably is that I cannot seem to pass multiple <code>JSON</code> parameters through a controller method anymore.</p>
  
  <p>For example, I have the following controller method;</p>
  
  <pre><code>[HttpPost]
  [Route("edit/profile")]
  public void Attribute([FromBody]Models.Profile model, bool editing) {
      // ...
      // model always comes in null
      // editing always comes in default (false)
  }
  </code></pre>
  
  <p>I am attempting to pass data to this controller using <code>$.ajax</code>.</p>
  
  <pre><code>$.ajax({
      url: '/edit/profile',
      type: 'POST',
      dataType: 'json',
      contentType: 'application/json',
      data: JSON.stringify({ model: _this.model, editing: true })
  });
  </code></pre>
  
  <p>But no matter what I do, the parameters always come in <code>null</code> on the controller. I have tried various things, and if I ignore the <code>({ model : _this.model ... })</code> part and just pass in only ONE parameter, it comes through as expected <code>data: JSON.stringify(_this.model)</code></p>
  
  <p>The model looks like this; (obviously not the final model, just a dummy while I work on this problem)</p>
  
  <pre><code>_this.model = {
      Id: null,
      Name: null
      Text: null
  };
  </code></pre>
  
  <p>And it corresponds to this <code>C#</code> class;</p>
  
  <pre><code>namespace Models {
      public class Profile {
          public string Id { get; set; }
          public string Name { get; set; }
          public string Text { get; set; }
      }
  }
  </code></pre>
  
  <p>I just cannot figure it out for the life of me. This worked fine on <code>MVC 5</code>, but since upgrading it is just completely defunct. </p>
  
  <p>I am also using <strong><code>jQuery 2.1.4</code></strong></p>