title: Querying DocumentDB using a property other than Id
body: <p>I want to query my documents in my DocumentDB database. I want to use LINQ to handle the DocumentDB query and want to query for facebookUsername field.</p>
  
  <p>If I use the code below for querying the standard Id field, it works fine but when I try to do it using facebookUsername field, I get a compile error that reads</p>
  
  <blockquote>
    <p>"'Microsoft.Azure.Documents.Document' does not contain a definition
    for 'facebookUsername' and no extension method 'facebookUsername'
    accepting a first argument of type
    'Microsoft.Azure.Documents.Document' could be found (are you missing a
    using directive or an assembly reference?)"</p>
  </blockquote>
  
  <p>Here's the code I'm currently using for querying by Id and this works. I just want to be able to query the facebookUsername field.</p>
  
  <pre><code>dynamic doc = (from f in client.CreateDocumentQuery(collection.DocumentsLink)
     where f.Id == myId.ToString()
     select f).AsEnumerable().FirstOrDefault();
  </code></pre>
  
  <p>How do I modify my code to query by facebookUsername field?</p>