title: Core 3.1 - Binding some properties from Body and some others from Header
body: <p>I have the following model:</p>
  
  <pre><code>public class Network {
      public string Network { get; set; }
      public string Cidr { get; set; }
      public string TenantId { get; set; }
  }
  </code></pre>
  
  <p>And the following endpoint:</p>
  
  <pre><code>public async Task&lt;ActionResult&lt;Network&gt;&gt; PostNetwork(Network network)
  {
      ...
  }
  </code></pre>
  
  <p>And would like to know if it's possible to bind <code>Network</code> and <code>Cidr</code> with values from my post <code>Body</code>, and the <code>TenantId</code> with the value from a specific header.</p>
  
  <p>I don't wan't to put <code>entity.TenantId = HttpContext.Request.Headers["TenantId"];</code> all over my controllers endpoint because this pattern is necessary to several entities/endpoints.</p>
  
  <p>I've tried to create a custom middle-ware to edit my Body content, but the changes wasn't reflected in my controller. Also tried to use a custom DataBinder but without success.</p>