title: How to pass [FromBody] parameter in Web API using ExtJS AJAX call?
body: <p>I am new in ASP.NET Core Web API, I have tried to pass [FromData] through <code>ExtJS</code> AJAX call, but it's not working.</p>
  <p><strong>Controller Method:</strong></p>
  <p>This method I need to call through <code>ExtJS</code> ajax call:</p>
  <pre><code>[HttpPost]
  [Route(&quot;api/values/AddEmployee&quot;)]
  public int AddEmployee([FromBody] Employee employee)
  {
          return objemployee.AddEmployee(employee);
  }
  </code></pre>
  <p><strong>Employee Model:</strong></p>
  <pre><code>public class Employee
  {
      public int EmployeeId { get; set; }
      public string Name { get; set; }  
  
  
      public string Gender { get; set; }
      public string Department { get; set; }
      public string City { get; set; }
  }
  </code></pre>
  <p><strong><code>ExtJS</code> Ajax Call:</strong></p>
  <pre><code>Ext.Ajax.request({
          url: &quot;http://localhost:1452/api/values/AddEmployee&quot;,
          async: false,
          method: 'POST',
          headers: { 'Content-Type': 'application/json; charset=utf-8', 'Accept': '*/*' },
          jsonData: {
              employee: {
                  EmployeeId: 0,
                  Name: empName,
                  Gender: &quot;Male&quot;,
                  Department: empDep,
                  City: empCity
              }
          },
          success: function (data) {
              me.down('#grdCaseList').getStore().reload();
          },
          failure: function () {
  
          }
      });
  </code></pre>
  <p>But this AJAX call is not working, is there any mistake in my code?</p>