title: C# 8 understanding await using syntax
body: <p>I have next method:</p>
  
  <pre><code>public async Task&lt;IEnumerable&lt;Quote&gt;&gt; GetQuotesAsync()
  {
      using var connection = new SqlConnection(_connectionString);
  
      var allQuotes = await connection.QueryAsync&lt;Quote&gt;(@"SELECT [Symbol], [Bid], [Ask], [Digits] FROM [QuoteEngine].[RealtimeData]");
  
      return allQuotes;
  }
  </code></pre>
  
  <p>Everything fine and clear, connection will be disposed at the end of scope.</p>
  
  <p>But resharper suggests to change it to:</p>
  
  <pre><code>public async Task&lt;IEnumerable&lt;Quote&gt;&gt; GetQuotesAsync()
  {
      await using var connection = new SqlConnection(_connectionString);
  
      var allQuotes = await connection.QueryAsync&lt;Quote&gt;(@"SELECT [Symbol], [Bid], [Ask], [Digits] FROM [QuoteEngine].[RealtimeData]");
  
      return allQuotes;
  }
  </code></pre>
  
  <p>It adds await before using and code is compiled successfully. What does it mean and when do we need to do that?</p>