title: How to return a list of objects in ASP.NET Web API async controller method
body: <p>How to return a list of objects in the ASP.NET Web API async controller method or wrap a list inside the Task object?</p>
  
  <p>Class:</p>
  
  <pre><code>public class SubscriberHistory
  {
    public string Date;
    public string Message;
  
    public SubscriberHistory(string Date, string Message)
    {
      this.Date = Date;
      this.Message = Message;
    }
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>[HttpGet("[action]/{accountNumber}")]
  public Task&lt;SubscriberHistory&gt; GetSubscriberHistory(string accountNumber)
  {
      SubscriberManager subsManager = new SubscriberManager();
      return subsManager.GetSubscriberHistoryByAccountNumber(accountNumber);
  }
  </code></pre>
  
  <p>Controller Manager:</p>
  
  <pre><code>public async List&lt;SubscriberHistory&gt; GetSubscriberHistory()
  {
      List&lt;SubscriberHistory&gt; List = new List&lt;SubscriberHistory&gt;();
      // HttpClient get data
      return List; // ?
  }
  </code></pre>