title: ASP NET Core Web API Post method just ignores useless fields in JSON content
body: <p>I created a new ASP NET Core Web API and added a simple post endpoint in the WeatherForecast boilerplate Controller:</p>
  <pre><code>[HttpPost]
  public ActionResult&lt;IEnumerable&lt;WeatherForecast&gt;&gt; Post(WeatherForecast weather)
  {
      return Ok(weather);
  }
  </code></pre>
  <p>The WeatherForecast expected:</p>
  <pre><code>public class WeatherForecast
  {
      public int TemperatureC { get; set; }
  }
  </code></pre>
  <p>When I call that endpoint I'm passing the WeatherForecast with an additional field:</p>
  <pre><code>public class WeatherForecastDto
  {
      public int TemperatureC { get; set; }
      public int Id {get; set};
  }
  </code></pre>
  <pre><code>static void Main(string[] args)
  {
      HttpClient client = new()
      {
          BaseAddress = new Uri(&quot;https://localhost:7100/&quot;)
      };
  
      var weather = new WeatherForecastDto() { Id = 1, TemperatureC = 10 };
  
      var jsonContent = JsonSerializer.Serialize(weather);
      var strContent = new StringContent(jsonContent, Encoding.UTF8, &quot;application/json&quot;);
      var result = client.PostAsync(&quot;WeatherForecast/Post&quot;, strContent).Result;
  }
  </code></pre>
  <p>I was expected to receive an exception since I'm passing different content than the post is expecting, But when debugging the post endpoint the ID passed by the client is just ignored.</p>
  <p>How and why is responsible to discard the ID in the request pipeline?</p>