title: Bind properties FromForm .NET Core Web API
body: <p>I have .NET Core Web API project. One of my action controller is:</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;IActionResult&gt; Notify([FromForm] NotifyInput input)
  { ... }
  </code></pre>
  
  <p><code>NotifyInput.cs</code> file is in separate project (.NET Standard):</p>
  
  <pre><code>public string BodyPlain { get; set; }
  
  public string BodyHtml { get; set; }
  
  public List&lt;Attachment&gt; Attachments { get; set; }
  
  public class Attachment
  {
      public int Size { get; set; }
  
      public string Url { get; set; }
  
      public string Name { get; set; }
  
      public string ContentType { get; set; }
  }
  </code></pre>
  
  <p>And params I send to this method are:</p>
  
  <pre><code>body-plain: 123
  body-html: &lt;p&gt;123&lt;/p&gt;
  attachments: [{"url": "http://example.com", "content-type": "image/jpeg", "name": "pexels-photo.jpg", "size": 62169}]
  </code></pre>
  
  <p>I'm trying to send my data via Postman as <strong>x-www-form-urlencoded</strong> and as <strong>form-data</strong>.</p>
  
  <p>But when I debug this code, I see they are all <code>NULL</code>.</p>
  
  <p>Attribute <code>[JsonProperty("body-plain")]</code> didn't help me.</p>
  
  <p>How can I bind these params?</p>