title: Post multiple objects to web API
body: <p>I am trying to pass data to my web API using JSON objects. Sending a single object does seems to work fine but as soon as I put a second parameter, the second object does not even seems to initialize on the server side?</p>
  
  <p>Please view the code below to see how I am handling the data parameter  </p>
  
  <pre><code>[HttpPost("")]
  public JsonResult Post([FromBody]Log_Header headerData, 
                         [FromBody]Log_Detail detailData)
  {
      return Json("Test");
  }
  </code></pre>
  
  <p>Each of the classes above have simple string data, eg of class below:</p>
  
  <pre><code>public class Log_Header
  {
      public int Id { get; set; }
      public string Name{ get; set; }
  }
  </code></pre>
  
  <p>Example of data being sent:</p>
  
  <pre><code>var header = {
      Id: 0,
      Name: "Test 3",
  }
  
  var detail = {
      Id: 0,
      Desc: "Test 1",
  }
  
  $http({
      method: 'POST',
      url: "api/addLog",
      data : { 
          header: header,
          detail: detail
      }
  })
  </code></pre>
  
  <p><strong>This is all just demo data.</strong></p>
  
  <p>I have tried sending the data up in few different ways e.g below:</p>
  
  <pre><code> var data = {
       Id: 0,
       Name: "Test 3",
       LogID: 0,
       Desc: "Test",
   }
  </code></pre>
  
  <p>But nothing seems to get this working, I'm guessing I am setting up the web API incorrectly?</p>
  
  <p>Overall, the problem is <code>[FromBody]Release_Log_Detail detailData</code> does not receive any data at all and when viewing the object from a breakpoint it appears as <code>null</code>. </p>
  
  <p>if anyone has any ideas please leave a comment or answer below. If you need anymore information from me please ask. </p>