title: async query in cosmos db
body: <p>I'm trying to do a query in cosmos db. I want a async query. The query return me only one element. In the web I have seen how to do it when query return more than one element. This is my method:</p>
  
  <pre><code>    public async Task&lt;TenantDetails&gt; ReadBrokerSettings(string tenantId)
      {
          FeedOptions queryOptions = new FeedOptions { MaxItemCount = -1 };
  
          var tenantDTO = this._client.CreateDocumentQuery&lt;TenantDTO&gt;(
               UriFactory.CreateDocumentCollectionUri(_idDatabase, _idCollection), queryOptions)
               .Where(f =&gt; f.tenantId == tenantId)
               .AsEnumerable()
               .SingleOrDefault();
  
          return tenantDTO != null ? _iTenantAssembler.DtoToEntity(tenantDTO) : null;
      }
  </code></pre>
  
  <p>Compiler say me than it isn't async. Thanks</p>