title: Property is null after binding using FromRoute attribute on a POST request
body: <p>I have an endpoint decorated with <code>[HttpPost]</code> attribute.<br/>
  This endpoint url should have one of it's input object's properties coming from the route itself but all other properties should come from the request body.
  <br/><br/>
  This is the endpoint decorated with it's routing definition:</p>
  <pre><code>[HttpPost]    
  [Route(&quot;{userId}/orders/add&quot;)]
  public async Task&lt;ActionResult&lt;UserOrderCreationRequest&gt;&gt; CreateOrder(
             [FromBody]RequestObject request)
  </code></pre>
  <p>The request object have a property defined like this:</p>
  <pre><code> public class RequestObject
  {
      [FromRoute(Name = &quot;userId&quot;)]
      public string UserId { get; set; }
  
      public Order order { get; set; }
  }
  </code></pre>
  <p>For some reason the UserId is not getting populated and is coming null.
  <br/>
  BUT, when I change the <code>[FromBody]</code> to <code>[FromQuery]</code> it is working well.
  <br/>
  I have also tried removing the <code>[FromBody]</code> without any replacement and it still didn't work as I got UserId equals null.
  <br/>
  Can someone explain this behavior? Why only the
  <code>[FromQuery]</code> gets it to work?<br/><br/>
  Any other solution that doesn't include creating <code>CustomBinder</code> will be much appreciated.</p>