MongoDbGenericRepository The IBaseMongoRepository exposes the functionality of the BaseMongoRepository. The connection string. The database name. Asynchronously adds a document to the collection. The type representing a Document. The document you want to add. Adds a document to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The document you want to add. Asynchronously adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The document you want to add. Adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The document you want to add. Asynchronously adds a document to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The document you want to add. Adds a document to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The document you want to add. Asynchronously adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The documents you want to add. Adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The documents you want to add. Asynchronously returns one document given its id. The type representing a Document. The Id of the document you want to get. An optional partition key. Returns one document given its id. The type representing a Document. The Id of the document you want to get. An optional partition key. Asynchronously returns one document given an expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. Returns one document given an expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. Returns a collection cursor. The type representing a Document. A LINQ expression filter. An optional partition key. Asynchronously returns true if any of the document of the collection matches the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Returns true if any of the document of the collection matches the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Asynchronously returns a list of the documents matching the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Returns a list of the documents matching the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Asynchronously counts how many documents match the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Counts how many documents match the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Asynchronously returns one document given its id. The type representing a Document. The type of the primary key for a Document. The Id of the document you want to get. An optional partition key. Returns one document given its id. The type representing a Document. The type of the primary key for a Document. The Id of the document you want to get. An optional partition key. Asynchronously returns one document given an expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns one document given an expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns a collection cursor. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns true if any of the document of the collection matches the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns true if any of the document of the collection matches the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Asynchronously returns a list of the documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns a list of the documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Asynchronously counts how many documents match the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partitionKey Counts how many documents match the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partitionKey Asynchronously Updates a document. The type representing a Document. The document with the modifications you want to persist. Updates a document. The type representing a Document. The document with the modifications you want to persist. Asynchronously Updates a document. The type representing a Document. The type of the primary key for a Document. The document with the modifications you want to persist. Updates a document. The type representing a Document. The type of the primary key for a Document. The document with the modifications you want to persist. Asynchronously deletes a document. The type representing a Document. The document you want to delete. The number of documents deleted. Asynchronously deletes a document matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Deletes a document. The type representing a Document. The document you want to delete. The number of documents deleted. Deletes a document matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes a list of documents. The type representing a Document. The list of documents to delete. The number of documents deleted. Deletes a list of documents. The type representing a Document. The list of documents to delete. The number of documents deleted. Deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Deletes a document. The type representing a Document. The type of the primary key for a Document. The document you want to delete. The number of documents deleted. Asynchronously deletes a document matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. The document you want to delete. The number of documents deleted. Deletes a document matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes a document matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes a list of documents. The type representing a Document. The type of the primary key for a Document. The list of documents to delete. The number of documents deleted. Deletes a list of documents. The type representing a Document. The type of the primary key for a Document. The list of documents to delete. The number of documents deleted. Deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously returns a projected document matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a projected document matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Returns a projected document matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Returns a projected document matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a paginated list of the documents matching the filter condition. The type representing a Document. The number of documents you want to skip. Default value is 0. The number of documents you want to take. Default value is 50. An optional partition key. Asynchronously returns a paginated list of the documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. The number of documents you want to skip. Default value is 0. The number of documents you want to take. Default value is 50. An optional partition key. GetAndUpdateOne with filter The type representing a Document. GetAndUpdateOne with filter The type representing a Document. The type of the primary key for a Document. The base Repository, it is meant to be inherited from by your custom custom MongoRepository implementation. Its constructor must be given a connection string and a database name. The connection string. The database name. The constructor taking a connection string and a database name. The connection string of the MongoDb server. The name of the database against which you want to perform operations. The contructor taking a . A mongodb context implementing The MongoDbContext Asynchronously adds a document to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The document you want to add. Adds a document to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The document you want to add. Asynchronously adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The documents you want to add. Adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The documents you want to add. Asynchronously adds a document to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The document you want to add. Adds a document to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The document you want to add. Asynchronously adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The documents you want to add. Adds a list of documents to the collection. Populates the Id and AddedAtUtc fields if necessary. The type representing a Document. The type of the primary key for a Document. The documents you want to add. Asynchronously returns one document given its id. The type representing a Document. The Id of the document you want to get. An optional partition key. Returns one document given its id. The type representing a Document. The Id of the document you want to get. An optional partition key. Asynchronously returns one document given an expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. Returns one document given an expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. Returns a collection cursor. The type representing a Document. A LINQ expression filter. An optional partition key. Returns true if any of the document of the collection matches the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Returns true if any of the document of the collection matches the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Asynchronously returns a list of the documents matching the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Returns a list of the documents matching the filter condition. The type representing a Document. A LINQ expression filter. An optional partition key. Asynchronously counts how many documents match the filter condition. The type representing a Document. A LINQ expression filter. An optional partitionKey Counts how many documents match the filter condition. The type representing a Document. A LINQ expression filter. An optional partitionKey Asynchronously returns one document given its id. The type representing a Document. The type of the primary key for a Document. The Id of the document you want to get. An optional partition key. Returns one document given its id. The type representing a Document. The type of the primary key for a Document. The Id of the document you want to get. An optional partition key. Asynchronously returns one document given an expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns one document given an expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns a collection cursor. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns true if any of the document of the collection matches the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns true if any of the document of the collection matches the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Asynchronously returns a list of the documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Returns a list of the documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. Asynchronously counts how many documents match the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partitionKey Counts how many documents match the filter condition. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partitionKey Asynchronously Updates a document. The type representing a Document. The document with the modifications you want to persist. Updates a document. The type representing a Document. The document with the modifications you want to persist. Asynchronously Updates a document. The type representing a Document. The type of the primary key for a Document. The document with the modifications you want to persist. Updates a document. The type representing a Document. The type of the primary key for a Document. The document with the modifications you want to persist. Asynchronously deletes a document. The type representing a Document. The document you want to delete. The number of documents deleted. Deletes a document. The type representing a Document. The document you want to delete. The number of documents deleted. Deletes a document matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes a document matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes a list of documents. The type representing a Document. The list of documents to delete. The number of documents deleted. Deletes a list of documents. The type representing a Document. The list of documents to delete. The number of documents deleted. Deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Deletes a document. The type representing a Document. The type of the primary key for a Document. The document you want to delete. The number of documents deleted. Asynchronously deletes a document matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. The document you want to delete. The number of documents deleted. Deletes a document matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes a document matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously deletes a list of documents. The type representing a Document. The type of the primary key for a Document. The list of documents to delete. The number of documents deleted. Deletes a list of documents. The type representing a Document. The type of the primary key for a Document. The list of documents to delete. The number of documents deleted. Deletes the documents matching the condition of the LINQ expression filter. The type representing a Document. The type of the primary key for a Document. A LINQ expression filter. An optional partition key. The number of documents deleted. Asynchronously returns a projected document matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a projected document matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Returns a projected document matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Returns a projected document matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a list of projected documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. The type representing the model you want to project to. The projection expression. An optional partition key. Asynchronously returns a paginated list of the documents matching the filter condition. The type representing a Document. The number of documents you want to skip. Default value is 0. The number of documents you want to take. Default value is 50. An optional partition key. Asynchronously returns a paginated list of the documents matching the filter condition. The type representing a Document. The type of the primary key for a Document. The number of documents you want to skip. Default value is 0. The number of documents you want to take. Default value is 50. An optional partition key. GetAndUpdateOne with filter The type representing a Document. GetAndUpdateOne with filter The type representing a Document. The type of the primary key for a Document. This is the interface of the IMongoDbContext which is managed by the . The IMongoClient from the official MongoDb driver The IMongoDatabase from the official Mongodb driver The private GetCollection method Returns a collection for a document type that has a partition key. The value of the partition key. Returns a collection for a document type that has a partition key. The type representing a Document. The type of the primary key for a Document. The value of the partition key. Drops a collection, use very carefully. Drops a collection having a partitionkey, use very carefully. This class represents a basic document that can be stored in MongoDb. Your document must implement this class in order for the MongoDbRepository to handle them. The document constructor The Id of the document The datetime in UTC at which the document was added. The version of the schema of the document This class represents a basic document that can be stored in MongoDb. Your document must implement this class in order for the MongoDbRepository to handle them. The Primary Key, which must be decorated with the [BsonId] attribute if you want the MongoDb C# driver to consider it to be the document ID. A version number, to indicate the version of the schema. This class represents a basic document that can be stored in MongoDb. Your document must implement this class in order for the MongoDbRepository to handle them. This class represents a document that can be inserted in a collection that can be partitioned. The partition key allows for the creation of different collections having the same document schema. This can be useful if you are planning to build a Software as a Service (SaaS) Platform, or if you want to reduce indexing. You could for example insert Logs in different collections based on the week and year they where created, or their Log category/source. The partition key used to partition your collection. This class represents a document that can be inserted in a collection that can be partitioned. The partition key allows for the creation of different collections having the same document schema. This can be useful if you are planning to build a Software as a Service (SaaS) Platform, or if you want to reduce indexing. You could for example insert Logs in different collections based on the week and year they where created, or their Log category/source. The constructor, it needs a partition key. The name of the property used for partitioning the collection This will not be inserted into the collection. This partition key will be prepended to the collection name to create a new collection. The MongoDb context The IMongoClient from the official MongoDb driver The IMongoDatabase from the official Mongodb driver The constructor of the MongoDbContext, it needs a an object implementing . An object implementing IMongoDatabase The constructor of the MongoDbContext, it needs a connection string and a database name. The connections string. The name of your database. The private GetCollection method The type representing a Document. Returns a collection for a document type that has a partition key. The type representing a Document. The value of the partition key. Returns a collection for a document type that has a partition key. The type representing a Document. The type of the primary key for a Document. The value of the partition key. Drops a collection, use very carefully. The type representing a Document. Drops a collection having a partitionkey, use very carefully. The type representing a Document. Very naively pluralizes a TDocument type name. The type representing a Document. Container for registered Vocabularies. At present, only a single vocabulary is supported: Default. The default vocabulary used for singular/plural irregularities. Rules can be added to this vocabulary and will be picked up by called to Singularize() and Pluralize(). At this time, multiple vocabularies and removing existing rules are not supported. A container for exceptions to simple pluralization/singularization rules. Vocabularies.Default contains an extensive list of rules for US English. At this time, multiple vocabularies and removing existing rules are not supported. Adds a word to the vocabulary which cannot easily be pluralized/singularized by RegEx, e.g. "person" and "people". The singular form of the irregular word, e.g. "person". The plural form of the irregular word, e.g. "people". True to match these words on their own as well as at the end of longer words. False, otherwise. Adds an uncountable word to the vocabulary, e.g. "fish". Will be ignored when plurality is changed. Word to be added to the list of uncountables. Adds a rule to the vocabulary that does not follow trivial rules for pluralization, e.g. "bus" -> "buses" RegEx to be matched, case insensitive, e.g. "(bus)es$" RegEx replacement e.g. "$1" Adds a rule to the vocabulary that does not follow trivial rules for singularization, e.g. "vertices/indices -> "vertex/index" RegEx to be matched, case insensitive, e.g. ""(vert|ind)ices$"" RegEx replacement e.g. "$1ex" Pluralizes the provided input considering irregular words Word to be pluralized Normally you call Pluralize on singular words; but if you're unsure call it with false Singularizes the provided input considering irregular words Word to be singularized Normally you call Singularize on plural words; but if you're unsure call it with false Inflector extensions Pluralizes the provided input considering irregular words Word to be pluralized Normally you call Pluralize on singular words; but if you're unsure call it with false Singularizes the provided input considering irregular words Word to be singularized Normally you call Singularize on plural words; but if you're unsure call it with false By default, pascalize converts strings to UpperCamelCase also removing underscores Same as Pascalize except that the first character is lower case Separates the input words with underscore The string to be underscored Replaces underscores with dashes in the string Replaces underscores with hyphens in the string