title: MongoDB C# driver - how to query a property on an array of subdocuments
body: <p>Let's suppose I have the following document structure in MongoDB.</p>
  
  <pre><code>{
      _id: ####,
      Ancestors: [
          { _id: 1, Name: "asdf" },
          { _id: 2, Name: "jkl;" },
          ...
      ]
  }
  </code></pre>
  
  <p>I want to find every document that contains an Ancestor where _id of the Ancestor is 2.</p>
  
  <p>I can run this query in the mongo shell using this:  <code>db.projects.find({"Ancestors._id": 2})</code></p>
  
  <p>I can also run this query using the official C# driver using this:  <code>Query.EQ("Ancestors._id", new BsonInt32(rootProjectId))</code>.</p>
  
  <p>Here are my POCOs; the actual classes I'm using have more properties than this, but I didn't want to clutter up the question with unnecessary details:</p>
  
  <pre><code>public class Project
  {
      public int Id { get; set; }
      public List&lt;ProjectRef&gt; Ancestors { get; set; }
  }
  
  public class ProjectRef
  {
      public int Id { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>My question is:  How can I write a strongly-typed query using the C# driver so that I don't have to pass in "Ancestors._id" as a string?  I want to be able to do something like <code>Query&lt;Project&gt;.EQ(p =&gt; p.Id, rootProjectId)</code> so that I can instead use a member expression and let the class mappings tell the driver that it should use "Ancestors._id".</p>