title: Parameter passed to ASP.NET Core Controller using ajax is always null
body: <p>I am upgrading mvc application to .Net Core and am having difficulty passing a string value via ajax to the controller.  I have tried various solutions I found on the web (<code>[FormBody]</code>, prefixing with <code>=</code>, and some others), but no luck.  The value is always null.  What has changed in Core that I need to fix?</p>
  
  <pre><code>      var result = "";
  
    $.ajax({
        url: "https://......./api/lookups/Search",
        type: "POST",
        data: JSON.stringify(g),
        async: false,
        dataType: "json",
        contentType: 'application/json; charset=utf-8',
        success: function (data) {
         result = data;
      },
      done: function (data) {
         result = data;
      },
         fail: function (data) {
         result = data;
      },
         error: function (jqXHR, textStatus, errorThrown) {
         alert('request failed :' + errorThrown);
      }
  });
  
  
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Data;
  using Microsoft.AspNetCore.Mvc;
  
  namespace zpmAPI.Controllers
  {
      [Route("api/[controller]/[action]")]
      [ApiController]
      public class LookupsController : ControllerBase
      {
          private zBestContext db = new zBestContext();
  
          // GET api/values
          [HttpGet]
          public string sayHello()
          {
              return "hello";
          }
  
          [HttpPost]
          //[Route("api/Lookups/LocationSearch")]
          public JsonResult LocationSearch(GeneralSearch g)
          {
              return new JsonResult( "hello from LocationSearch");
          }
  </code></pre>