title: The 'await' operator can only be used within an async lambda expression error
body: <p>I have  this function:</p>
  
  <pre><code>    public async Task&lt;IEnumerable&lt;RegionBreif&gt;&gt; GetAsync()
      {
  
      return await Table.Where(x =&gt; x.SiteId == _siteId).Select(r =&gt; new RegionBreif
      {
          IsServiceable = await RegionBreif.checkIfServicable(Context, r.SiteId, r.Id)
      }).ToArrayAsync();
  }
  </code></pre>
  
  <p>And this function:</p>
  
  <pre><code>public static async Task&lt;bool?&gt; checkIfServicable(DbContext context, int? _siteId, int _regionId)
  {
      var t = (from ir in context.Set&lt;InspectionReview&gt;()
               join so in context.Set&lt;SiteObject&gt;() on ir.ObjectId equals so.Id
               where so.SiteRegionId == _regionId &amp;&amp; so.SiteId == _siteId
               select (bool?)
               ir.IsNormal);
  
      return t.Count() == 0 ? (bool?)null : t.Any(x =&gt; x.Value == false) ? false : true;
  }
  </code></pre>
  
  <p>On this row:</p>
  
  <pre><code>await RegionBreif.checkIfServicable(Context, r.SiteId, r.Id)
  </code></pre>
  
  <p>I get this error:</p>
  
  <p>Error   13  The 'await' operator can only be used within an async lambda expression. Consider marking this lambda expression with the 'async' modifier.</p>