title: How to combine multiple lists asynchronously
body: <p>I am not getting how to combine two list producing tasks into a common list.  The below code is incomplete and/or wrong, but I think will get my dilemma across. The OrderFactory requests data from an Internet server. Each OrderFactory completes at some future time and independent of any other OrderFactory. How can the List orders returned from each task be combined into one list? Both tasks are to start together but will return at a different future time.</p>
  
  <p>TIA</p>
  
  <pre><code>        private async Task&lt;List&lt;Orders&gt;&gt; GetReturnToOfficeOrdersAsync(PatientService patient)
          {
              var orders = new List&lt;Orders&gt;();
              var x =  await OrderFactory.CreateOrders(OrderType.RETURNTOOFFICE, patient);
              orders.AddRange(x);
              return orders;
          }
  
          private async Task&lt;List&lt;Orders&gt;&gt; GetProceduresAsync(PatientService patient)
          {
              var orders = new List&lt;Orders&gt;();
              var x = await OrderFactory.CreateOrders(OrderType.PROCEDURE, patient);
              orders.AddRange(x);
              return orders;
          }
  
  
          private async Task GetInCompleteOrderListAsync()
          {
              if (patient == null) return;
  
              var orders = new List&lt;Orders&gt;();
  
  *** THE LISTS FROM THESE TASKS NEED TO BE COMBINED INTO ONE LIST -- HOW???    
              var a = GetReturnToOfficeOrdersAsync(patient);
              var b = GetProceduresAsync(patient);
              await Task.WhenAll(a, b);
  
              orders = orders.OrderByDescending(o =&gt; o.torder).ToList();
  
              IncompleteOrders = new ObservableCollection&lt;Orders&gt;(orders);
          }
  </code></pre>