title: ASP Net Core MVC Ajax Post
body: <p>I have the following code and it works perfectly fine until I add the last property in the js object</p>
  
  <p>JS:</p>
  
  <pre><code>var serializableFilter = {};
  
  serializableFilter.aosType = filter.aos.type;
  serializableFilter.aosText = filter.aos.text;
  serializableFilter.industries = filter.industries.getCommaSeperatedIDs();
  serializableFilter.servicingBanks = filter.servicingBanks.getCommaSeperatedIDs();
  serializableFilter.category = filter.categories.categoryID;
  serializableFilter.yearEstablishedFrom = filter.yearEstablished.from;
  serializableFilter.yearEstablishedTo = filter.yearEstablished.to;
  serializableFilter.staffMin = filter.nbStaff.min;
  serializableFilter.staffMax = filter.nbStaff.max;
  //serializableFilter.includeBranches = filter.includeBranches;
  
  $.ajax({
      url: url,
      type: "POST",
      dataType: 'json',
      contentType: 'application/json; charset=utf-8',
      data: JSON.stringify(serializableFilter),
      success: function (result) {
          console.log(result);
      },
      error: function () {
          alert('error');
      }
  });
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;IEnumerable&lt;FdxxxMap&gt;&gt; GetC([FromBody] Filter data)
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>public class Filter
  {
      public string aosType { get; set; }
      public string aosText { get; set; }
      public string industries { get; set; }
      public string servicingBanks { get; set; }
      public int category { get; set; }
      public int yearEstablishedFrom { get; set; }
      public int yearEstablishedTo { get; set; }
      public int staffMin { get; set; }
      public int staffMax { get; set; }
      public Boolean includeBranches { get; set; }
  }
  </code></pre>
  
  <p>Whenever I add the last property of type boolean, the data model is passed as null</p>