title: WebAPI Is it possible to post an IFormCollection and Object in an action?
body: <p>Is it possible to post an IFormCollection and Object in an action?</p>
  
  <pre><code>public Task CreateEMail(IFormCollection collection, [FromBody] Model model)
  </code></pre>
  
  <p>I try to make an post request to WebAPI from Angular and the request is a combination of uploaded files and a model.</p>
  
  <p>Angular code:</p>
  
  <pre><code>let model = {title:'test', subject:'test'};
  let formData = new FormData();
  for (let i = 0; i &lt; this.droppedFilesData.length; i++) {
      let file = this.droppedFilesData[i];
      let fileName = file.name;
      formData.append(fileName, file);
  }
  this.service.createEmail(formData, model); // how to implement to post formData and model
  </code></pre>
  
  <p>WebAPI Code:</p>
  
  <pre><code>public Task CreateEMail(IFormCollection collection, [FromBody] Model model)
  {
      ...
  }
  </code></pre>
  
  <p>How do I implement this WebAPI?</p>
  
  <p>Update: I am thinking about adding everything into FormCollection but that would be really bad code to parse data</p>