title: Post Method is not working in ASP.NET Core
body: <p>I am trying to create ASP.NET Core Web API. I have Post/Get method as per below:</p>
  
  <pre><code>    [HttpGet]
      [Route("api/getProffessionByID/{id}")]
      public IHttpActionResult getProffessionByID(Int64 id)
      {
          AllProffession model = new AllProffession();
          try
          {
              var result = model.GetAllProffession.Where(i =&gt; i.id == id).FirstOrDefault();
              return Ok(result);
          }
          catch (Exception ex)
          {
              return InternalServerError("Something Went Wrong : " + ex.ToString());
          }
      }
  
      [HttpPost]
      [Route("api/savePerson")]
      private IHttpActionResult savePerson(PersonModel model)
      {
          try
          {
              if (model.name != string.Empty || model.weight != 0 || model.height != 0 || model.proffession != 0)
              {
                  Guid guid = Guid.NewGuid();
                  Random random = new Random();
                  int i = random.Next();
                  model.id = i;
                  return Ok(model);
              }
              else
              {
                  return BadRequest();
              }
          }
          catch (Exception ex)
          {
              return InternalServerError("Something Went Wrong : " + ex.ToString());
          }
      }
  </code></pre>
  
  <p>My get Method is working all fine from url as well as Postman.
  <a href="https://i.stack.imgur.com/Lprmq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lprmq.png" alt="enter image description here"></a></p>
  
  <p>I've tried [FromBody] As well, but it is also not working</p>
  
  <p><strong>Model:</strong></p>
  
  <pre><code>public class PersonModel
      {
          public int id { get; set; }
          public string name { get; set; }
          public int weight { get; set; }
          public int height { get; set; }
          public int proffession { get; set; }
      }
  </code></pre>
  
  <p><strong>WebApiConfig.cs</strong></p>
  
  <pre><code>public static void Register(HttpConfiguration config)
          {
              // Web API configuration and services
  
              // Web API routes
              config.MapHttpAttributeRoutes();
  
              config.Routes.MapHttpRoute(
                  name: "DefaultApi",
                  routeTemplate: "api/{controller}/{id}",
                  defaults: new { Controllers = "API", id = RouteParameter.Optional }
              );
  
              config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
          }
  </code></pre>