title: Aggregate $lookup with C#
body: <p>I have the following MongoDb query working:</p>
  
  <pre><code>db.Entity.aggregate(
      [
          {
              "$match":{"Id": "12345"}
          },
          {
              "$lookup": {
                  "from": "OtherCollection",
                  "localField": "otherCollectionId",
                  "foreignField": "Id",
                  "as": "ent"
              }
          },
          { 
              "$project": { 
                  "Name": 1,
                  "Date": 1,
                  "OtherObject": { "$arrayElemAt": [ "$ent", 0 ] } 
              }
          },
          { 
              "$sort": { 
                  "OtherObject.Profile.Name": 1
              } 
          }
      ]
  )
  </code></pre>
  
  <p>This retrieves a list of objects joined with a matching object from another collection.</p>
  
  <p>Does anybody know how I can use this in C# using either LINQ or by using this exact string?</p>
  
  <p>I tried using the following code but it can't seem to find the types for <code>QueryDocument</code> and <code>MongoCursor</code> - I think they've been deprecated?</p>
  
  <pre><code>BsonDocument document = MongoDB.Bson.Serialization.BsonSerializer.Deserialize&lt;BsonDocument&gt;("{ name : value }");
  QueryDocument queryDoc = new QueryDocument(document);
  MongoCursor toReturn = _connectionCollection.Find(queryDoc);
  </code></pre>