title: Why is my .Net Core API not receiving data from request payload?
body: <p>I'm building a Angular website with .Net Core API as backend. When I post a new postcode my Angular service sends the data correctly, but my API is not receiving the data. </p>
  
  <p>The edit (put) works fine using similar code.</p>
  
  <p>Add (post): <a href="https://i.stack.imgur.com/bc2FY.png" rel="nofollow noreferrer">postcode values are null in Code</a>
  , <a href="https://i.stack.imgur.com/XAbwK.png" rel="nofollow noreferrer">postcodes values are filled in Request Payload</a></p>
  
  <p>Edit (put): <a href="https://i.stack.imgur.com/RsdyU.png" rel="nofollow noreferrer">postcode values are not null in Code</a>, <a href="https://i.stack.imgur.com/h35OQ.png" rel="nofollow noreferrer">the request payload of put</a></p>
  
  <p>PostCodeController: </p>
  
  <pre><code>    [Route("api/[controller]")]
      public class PostcodeController : Controller
      {
          IPostCodeAcces&lt;PostcodeVerwerking, int&gt; _postcodeRepo;
          public PostcodeController(IPostCodeAcces&lt;PostcodeVerwerking, int&gt;p)
          {
              _postcodeRepo = p;
          }
  
          [HttpPost]
          public IActionResult Post([FromForm]PostcodeVerwerking postcode)
          {
              int res = _postcodeRepo.AddPostcode(postcode); 
              if (res != 0)
              {
                  return Ok();
              }
              return Forbid();
          }
  
          [HttpPut("{id}")]
          public IActionResult Put(int id, [FromForm] PostcodeVerwerking p)
          {
              if (id == p.Id)
              {
                  int res = _postcodeRepo.UpdatePostcode(id, p);
                  if (res != 0)
                  {
                      return Ok(res);
                  }
                  return NotFound();
              }
              return NotFound();
          }
      }
  </code></pre>
  
  <p>Angular Service:</p>
  
  <pre><code>  putPostcode(id, formdata: FormData): Observable&lt;PostcodeVerwerking&gt;{
      return this.http.put&lt;PostcodeVerwerking&gt;(this.apiUrl + "/" + id, formdata);
    }
  
    postPostcode(formdata: FormData): Observable&lt;PostcodeVerwerking&gt;{
      return this.http.post&lt;PostcodeVerwerking&gt;(this.apiUrl, formdata);
    }
  </code></pre>