Ejemplo n.º 1
0
 /// <summary>
 /// Resolves a reference to a document. Collection name and database name are ignored.
 /// </summary>
 public static T Load <T>(this DocRef <T> docRef, IMongoCollection <T> collection)
 {
     return(collection
            .Find(Builders <T> .Filter.Eq("_id", docRef.Id))
            .SingleOrDefault());
 }