title: ActionResult<IEnumerable<T>> has to return a List<T>
body: <p>Take the following code using ASP.NET Core 2.1:</p>
  
  <pre><code>[HttpGet("/unresolved")]
  public async Task&lt;ActionResult&lt;IEnumerable&lt;UnresolvedIdentity&gt;&gt;&gt; GetUnresolvedIdentities()
  {
     var results = await _identities.GetUnresolvedIdentities().ConfigureAwait(false);
     return results.ToList();
  }
  </code></pre>
  
  <p>I would have thought since <code>GetUnresolvedIdentities()</code> returns <code>IEnumerable&lt;UnresolvedIdentity&gt;</code> that I could just return</p>
  
  <pre><code>return await _identities.GetUnresolvedIdentities().ConfigureAwait(false);
  </code></pre>
  
  <p>Except I can't, as I get this error:</p>
  
  <blockquote>
    <p>CS0029 Cannot implicitly convert type
    <code>'System.Collections.Generic.IEnumerable&lt;Data.Infrastructure.Models.UnresolvedIdentity&gt;'</code>
    to
    <code>'Microsoft.AspNetCore.Mvc.ActionResult&lt;System.Collections.Generic.IEnumerable&lt;Data.Infrastructure.Models.UnresolvedIdentity&gt;&gt;'</code></p>
  </blockquote>
  
  <p>I need the <code>.ToList()</code>, which is annoying as it's 2 lines rather than 1.</p>
  
  <p>Why can't <code>ActionResult&lt;T&gt;</code> figure out that <code>GetUnresolvedIdentities()</code> returns an <code>IEnumerable&lt;&gt;</code> and just return that?</p>
  
  <p>The signature of <code>GetUnresolvedIdentities</code> is:</p>
  
  <pre><code>Task&lt;IEnumerable&lt;UnresolvedIdentity&gt;&gt; GetUnresolvedIdentities();
  </code></pre>