title: mongodb c# driver join query
body: <pre><code>public class Person
  {
      public ObjectId _id { get; set; }
      public int AddressID { get; set; }
      public int Age { get; set; }
      public Person Father { get; set; }
      public string ID { get; set; }
      public double Income { get; set; }
      public string Name { get; set; }
  }
  
  
  public class Address
  {
      public ObjectId _id { get; set; }
      public int HouseNo { get; set; }
      public int ID { get; set; }
      public string Street { get; set; }
  }
  </code></pre>
  
  <p>How do I get Sum of Income  by street? by using mongodb c# driver</p>
  
  <p>Got income by Age.</p>
  
  <pre><code>var personcollection = this.cdb.GetCollection&lt;Person&gt;("person");
  var aggregate = personcollection.Aggregate()
              .Group(new BsonDocument { { "_id", "$Age" }, { "sum", new BsonDocument("$sum", "$Income") } });
   var results = await aggregate.ToListAsync();
  </code></pre>
  
  <p>but I have know Idea  how to link two documents for a single query.</p>
  
  <p>Thanks for you help.</p>