MongoCollection Methods | 
The MongoCollection type exposes the following members.
| Name | Description | |
|---|---|---|
| Aggregate | 
            Represents an aggregate framework query. The command is not sent to the server until the result is enumerated.
              | |
| AggregateExplain | 
            Runs an aggregate command with explain set and returns the explain result.
              | |
| Count | 
            Counts the number of documents in this collection.
              | |
| Count(CountArgs) | 
            Counts the number of documents in this collection that match a query.
              | |
| Count(IMongoQuery) | 
            Counts the number of documents in this collection that match a query.
              | |
| CreateIndex(IMongoIndexKeys) | 
            Creates an index for this collection.
              | |
| CreateIndex(String) | 
            Creates an index for this collection.
              | |
| CreateIndex(IMongoIndexKeys, IMongoIndexOptions) | 
            Creates an index for this collection.
              | |
| Distinct(String) | 
            Returns the distinct values for a given field.
              | |
| Distinct(String, IMongoQuery) | 
            Returns the distinct values for a given field for documents that match a query.
              | |
| DistinctTValue(DistinctArgs) | 
            Returns the distinct values for a given field.
              | |
| DistinctTValue(String) | 
            Returns the distinct values for a given field.
              | |
| DistinctTValue(String, IMongoQuery) | 
            Returns the distinct values for a given field for documents that match a query.
              | |
| Drop | 
            Drops this collection.
              | |
| DropAllIndexes | 
            Drops all indexes on this collection.
              | |
| DropIndex(IMongoIndexKeys) | 
            Drops an index on this collection.
              | |
| DropIndex(String) | 
            Drops an index on this collection.
              | |
| DropIndexByName | 
            Drops an index on this collection.
              | |
| EnsureIndex(IMongoIndexKeys) |  Obsolete.  
            Ensures that the desired index exists and creates it if it does not.
              | |
| EnsureIndex(String) |  Obsolete.  
            Ensures that the desired index exists and creates it if it does not.
              | |
| EnsureIndex(IMongoIndexKeys, IMongoIndexOptions) |  Obsolete.  
            Ensures that the desired index exists and creates it if it does not.
              | |
| Equals | Determines whether the specified object is equal to the current object.  (Inherited from Object.) | |
| Exists | 
            Tests whether this collection exists.
              | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.  (Inherited from Object.) | |
| FindAllAs(Type) | 
            Returns a cursor that can be used to find all documents in this collection as TDocuments.
              | |
| FindAllAsTDocument | 
            Returns a cursor that can be used to find all documents in this collection as TDocuments.
              | |
| FindAndModify(FindAndModifyArgs) | 
            Finds one matching document using the supplied arguments and applies the specified update to it.
              | |
| FindAndModify(IMongoQuery, IMongoSortBy, IMongoUpdate) |  Obsolete.  
            Finds one matching document using the query and sortBy parameters and applies the specified update to it.
              | |
| FindAndModify(IMongoQuery, IMongoSortBy, IMongoUpdate, Boolean) |  Obsolete.  
            Finds one matching document using the query and sortBy parameters and applies the specified update to it.
              | |
| FindAndModify(IMongoQuery, IMongoSortBy, IMongoUpdate, Boolean, Boolean) |  Obsolete.  
            Finds one matching document using the query and sortBy parameters and applies the specified update to it.
              | |
| FindAndModify(IMongoQuery, IMongoSortBy, IMongoUpdate, IMongoFields, Boolean, Boolean) |  Obsolete.  
            Finds one matching document using the query and sortBy parameters and applies the specified update to it.
              | |
| FindAndRemove(FindAndRemoveArgs) | 
            Finds one matching document using the supplied args and removes it from this collection.
              | |
| FindAndRemove(IMongoQuery, IMongoSortBy) |  Obsolete.  
            Finds one matching document using the query and sortBy parameters and removes it from this collection.
              | |
| FindAs(Type, IMongoQuery) | 
            Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments.
              | |
| FindAsTDocument(IMongoQuery) | 
            Returns a cursor that can be used to find all documents in this collection that match the query as TDocuments.
              | |
| FindOneAs(Type) | 
            Returns one document in this collection as a TDocument.
              | |
| FindOneAs(Type, FindOneArgs) | 
            Returns one document in this collection as a TDocument.
              | |
| FindOneAs(Type, IMongoQuery) | 
            Returns one document in this collection that matches a query as a TDocument.
              | |
| FindOneAsTDocument | 
            Returns one document in this collection as a TDocument.
              | |
| FindOneAsTDocument(FindOneArgs) | 
            Returns one document in this collection as a TDocument.
              | |
| FindOneAsTDocument(IMongoQuery) | 
            Returns one document in this collection that matches a query as a TDocument.
              | |
| FindOneByIdAs(Type, BsonValue) | 
            Returns a cursor that can be used to find one document in this collection by its _id value as a TDocument.
              | |
| FindOneByIdAsTDocument(BsonValue) | 
            Returns a cursor that can be used to find one document in this collection by its _id value as a TDocument.
              | |
| GeoHaystackSearchAs(Type, GeoHaystackSearchArgs) |  Obsolete.  
            Runs a geoHaystack search command on this collection.
              | |
| GeoHaystackSearchAs(Type, Double, Double, IMongoGeoHaystackSearchOptions) |  Obsolete.  
            Runs a geoHaystack search command on this collection.
              | |
| GeoHaystackSearchAsTDocument(GeoHaystackSearchArgs) |  Obsolete.  
            Runs a geoHaystack search command on this collection.
              | |
| GeoHaystackSearchAsTDocument(Double, Double, IMongoGeoHaystackSearchOptions) |  Obsolete.  
            Runs a geoHaystack search command on this collection.
              | |
| GeoNearAs(Type, GeoNearArgs) | 
            Runs a GeoNear command on this collection.
              | |
| GeoNearAs(Type, IMongoQuery, Double, Double, Int32) |  Obsolete.  
            Runs a GeoNear command on this collection.
              | |
| GeoNearAs(Type, IMongoQuery, Double, Double, Int32, IMongoGeoNearOptions) |  Obsolete.  
            Runs a GeoNear command on this collection.
              | |
| GeoNearAsTDocument(GeoNearArgs) | 
            Runs a GeoNear command on this collection.
              | |
| GeoNearAsTDocument(IMongoQuery, Double, Double, Int32) |  Obsolete.  
            Runs a GeoNear command on this collection.
              | |
| GeoNearAsTDocument(IMongoQuery, Double, Double, Int32, IMongoGeoNearOptions) |  Obsolete.  
            Runs a GeoNear command on this collection.
              | |
| GetHashCode | Serves as the default hash function.   (Inherited from Object.) | |
| GetIndexes | 
            Gets the indexes for this collection.
              | |
| GetStats | 
            Gets the stats for this collection.
              | |
| GetStats(GetStatsArgs) | 
            Gets the stats for this collection.
              | |
| GetType | Gets the Type of the current instance.  (Inherited from Object.) | |
| Group(GroupArgs) |  Obsolete.  
            Runs the group command on this collection.
              | |
| Group(IMongoQuery, BsonJavaScript, BsonDocument, BsonJavaScript, BsonJavaScript) |  Obsolete.  
            Runs the group command on this collection.
              | |
| Group(IMongoQuery, IMongoGroupBy, BsonDocument, BsonJavaScript, BsonJavaScript) |  Obsolete.  
            Runs the group command on this collection.
              | |
| Group(IMongoQuery, String, BsonDocument, BsonJavaScript, BsonJavaScript) |  Obsolete.  
            Runs the group command on this collection.
              | |
| IndexExists(IMongoIndexKeys) | 
            Tests whether an index exists.
              | |
| IndexExists(String) | 
            Tests whether an index exists.
              | |
| IndexExistsByName | 
            Tests whether an index exists.
              | |
| InitializeOrderedBulkOperationAsTDocument | 
            Creates a fluent builder for an ordered bulk operation.
              | |
| InitializeUnorderedBulkOperationAsTDocument | 
            Creates a fluent builder for an unordered bulk operation.
              | |
| Insert(Type, Object) | 
            Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
              | |
| Insert(Type, Object, MongoInsertOptions) | 
            Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
              | |
| Insert(Type, Object, WriteConcern) | 
            Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
              | |
| InsertTNominalType(TNominalType) | 
            Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
              | |
| InsertTNominalType(TNominalType, MongoInsertOptions) | 
            Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
              | |
| InsertTNominalType(TNominalType, WriteConcern) | 
            Inserts a document into this collection (see also InsertBatch to insert multiple documents at once).
              | |
| InsertBatch(Type, IEnumerable) | 
            Inserts multiple documents at once into this collection (see also Insert to insert a single document).
              | |
| InsertBatch(Type, IEnumerable, MongoInsertOptions) | 
            Inserts multiple documents at once into this collection (see also Insert to insert a single document).
              | |
| InsertBatch(Type, IEnumerable, WriteConcern) | 
            Inserts multiple documents at once into this collection (see also Insert to insert a single document).
              | |
| InsertBatchTNominalType(IEnumerableTNominalType) | 
            Inserts multiple documents at once into this collection (see also Insert to insert a single document).
              | |
| InsertBatchTNominalType(IEnumerableTNominalType, MongoInsertOptions) | 
            Inserts multiple documents at once into this collection (see also Insert to insert a single document).
              | |
| InsertBatchTNominalType(IEnumerableTNominalType, WriteConcern) | 
            Inserts multiple documents at once into this collection (see also Insert to insert a single document).
              | |
| IsCapped | 
            Tests whether this collection is capped.
              | |
| MapReduce |  Obsolete.  
            Runs a map-reduce command on this collection.
              | |
| MemberwiseClone | Creates a shallow copy of the current Object.  (Inherited from Object.) | |
| ParallelScanAs(Type, ParallelScanArgs) |  Obsolete.  
            Scans an entire collection in parallel using multiple cursors.
              | |
| ParallelScanAsTDocument(ParallelScanArgsTDocument) |  Obsolete.  
            Scans an entire collection in parallel using multiple cursors.
              | |
| ReIndex |  Obsolete.  
            Runs the ReIndex command on this collection.
              | |
| Remove(IMongoQuery) | 
            Removes documents from this collection that match a query.
              | |
| Remove(RemoveArgs) | 
            Removes documents from this collection that match a query.
              | |
| Remove(IMongoQuery, RemoveFlags) | 
            Removes documents from this collection that match a query.
              | |
| Remove(IMongoQuery, WriteConcern) | 
            Removes documents from this collection that match a query.
              | |
| Remove(IMongoQuery, RemoveFlags, WriteConcern) | 
            Removes documents from this collection that match a query.
              | |
| RemoveAll | 
            Removes all documents from this collection (see also Drop).
              | |
| RemoveAll(WriteConcern) | 
            Removes all documents from this collection (see also Drop).
              | |
| Save(Type, Object) | 
            Saves a document to this collection. The document must have an identifiable Id field. Based on the value
            of the Id field Save will perform either an Insert or an Update.
              | |
| Save(Type, Object, MongoInsertOptions) | 
            Saves a document to this collection. The document must have an identifiable Id field. Based on the value
            of the Id field Save will perform either an Insert or an Update.
              | |
| Save(Type, Object, WriteConcern) | 
            Saves a document to this collection. The document must have an identifiable Id field. Based on the value
            of the Id field Save will perform either an Insert or an Update.
              | |
| SaveTNominalType(TNominalType) | 
            Saves a document to this collection. The document must have an identifiable Id field. Based on the value
            of the Id field Save will perform either an Insert or an Update.
              | |
| SaveTNominalType(TNominalType, MongoInsertOptions) | 
            Saves a document to this collection. The document must have an identifiable Id field. Based on the value
            of the Id field Save will perform either an Insert or an Update.
              | |
| SaveTNominalType(TNominalType, WriteConcern) | 
            Saves a document to this collection. The document must have an identifiable Id field. Based on the value
            of the Id field Save will perform either an Insert or an Update.
              | |
| ToString | 
            Gets a canonical string representation for this database.
              (Overrides ObjectToString.) | |
| Update(IMongoQuery, IMongoUpdate) | 
            Updates one matching document in this collection.
              | |
| Update(IMongoQuery, IMongoUpdate, MongoUpdateOptions) | 
            Updates one or more matching documents in this collection (for multiple updates use UpdateFlags.Multi).
              | |
| Update(IMongoQuery, IMongoUpdate, UpdateFlags) | 
            Updates one or more matching documents in this collection (for multiple updates use UpdateFlags.Multi).
              | |
| Update(IMongoQuery, IMongoUpdate, WriteConcern) | 
            Updates one matching document in this collection.
              | |
| Update(IMongoQuery, IMongoUpdate, UpdateFlags, WriteConcern) | 
            Updates one or more matching documents in this collection (for multiple updates use UpdateFlags.Multi).
              | |
| Validate | 
            Validates the integrity of this collection.
              | |
| Validate(ValidateCollectionArgs) | 
            Validates the integrity of this collection.
              | 
| Name | Description | |
|---|---|---|
| AsQueryableT | 
            Returns an instance of IQueryable{{T}} for a MongoCollection.
              (Defined by LinqExtensionMethods.) | |
| ToBson | 
            Serializes an object to a BSON byte array.
              (Defined by BsonExtensionMethods.) | |
| ToBsonDocument | 
            Serializes an object to a BsonDocument.
              (Defined by BsonExtensionMethods.) | |
| ToJson | 
            Serializes an object to a JSON string.
              (Defined by BsonExtensionMethods.) |