How to read into memory the lines of a text file from an IFormFile in ASP.NET Core?
<p>Say you have this Action:</p>

<pre class="lang-cs prettyprint-override"><code>public List&lt;string&gt; Index(IFormFile file){

    //extract list of strings from the file
    return new List&lt;string&gt;();
}
</code></pre>

<p>I've found plenty of examples of saving the file to the drive, but what if I instead want to skip this and just read the lines of text into an array in memory, directly from the IFormFile?</p>