title: Is it possible to use lambda/linq with await on getting a collection?
body: <p>I've been using a lot of Async lately because the client application is a mobile app and it's important to use non ui blocking api.</p>
  
  <p>I've been doing queries like this:</p>
  
  <pre><code>var answer = _baseCommands.GetAll&lt;Answer&gt;().FirstOrDefault(x =&gt; x.QuestionId == question1.QuestionId &amp;&amp; x.IsCorrect);
  </code></pre>
  
  <p>Which is this method but I also use this as well:</p>
  
  <pre><code> IQueryable&lt;T&gt; GetAll&lt;T&gt;() where T : class;
   Task&lt;IQueryable&lt;T&gt;&gt; GetAllAsync&lt;T&gt;() where T : class;
  </code></pre>
  
  <p>This is the implementation for both in BaseCommands:</p>
  
  <pre><code>public IQueryable&lt;T&gt; GetAll&lt;T&gt;()
              where T : class
          {
              return _askDatabase.Set&lt;T&gt;();
          }
  
          public async Task&lt;IQueryable&lt;T&gt;&gt; GetAllAsync&lt;T&gt;()
              where T : class
          {
              return await Task.FromResult(_askDatabase.Set&lt;T&gt;());
          }
  </code></pre>
  
  <p>Is there anyway to write code like this so I can get all aysnc but with a lambda:</p>
  
  <pre><code> var answer = await _baseCommands.GetAllAsync&lt;Answer&gt;().Result.FirstOrDefault(x =&gt; x.QuestionId == question1.QuestionId &amp;&amp; x.IsCorrect);
  </code></pre>
  
  <p>What's good practise for this?</p>