title: Converting Task<DbSet<T>> to Task<IEnumerable<T>>
body: <p>I am trying to work out why is the first block of code erroring out and the second block isnt when the only difference is that the first one is using Task and the second block isnt. Looked into various sources but couldnt get clear answer.
  Anyone knows how to fix the first block? </p>
  
  <p>referred to links below but no luck so far
  <a href="https://stackoverflow.com/questions/30845579/how-to-cast-dbsett-to-listt">How to cast DbSet&lt;T&gt; to List&lt;T&gt;</a>  <br/>
  <a href="https://stackoverflow.com/questions/25204336/why-dbsettentity-doesnt-implement-enumerableasync">Why DbSet&lt;TEntity&gt; doesn&#39;t implement EnumerableAsync</a></p>
  
  <pre><code>    public Task&lt;IEnumerable&lt;Asset&gt;&gt; GetAll()
      {
          var assets = Task.Factory.StartNew(() =&gt; _context.Books);
          return assets;
         // tried  toList&lt;asset&gt;() on "return assets" as well but didnt make any difference.
      }
  
  
      public IEnumerable&lt;Asset&gt; GetAlls()
      {
          var assets = _context.Books;
          return assets;
      }
  </code></pre>