title: Creating millions of tasks to concurrently get data from api for each item
body: <p>I have a database table with a couple of millions records.
  For each record I need to get some additional data via API.</p>
  
  <p>So I am trying to utilize concurrency in C# with Task and async-await pattern.
  For each record I am creating a <code>Task</code> and within it I am calling an api using <code>HttpClient</code>.</p>
  
  <p>Unfortunately this yields Out of memory exception.</p>
  
  <pre><code>IEnumerable&lt;Task&lt;Item&gt;&gt; tasks =
              items.Select(
                  async i =&gt; await GetItemDataFromApi(i));
  
              var result = await Task.WhenAll(tasks);
  </code></pre>
  
  <p>Is this a way to do it? Should I create a task for getting each record's data?</p>