Share via


MongoDBServiceCollectionExtensions Class

Definition

Extension methods to register MongoDB Microsoft.Extensions.VectorData.IVectorStore instances on an IServiceCollection.

public static class MongoDBServiceCollectionExtensions
type MongoDBServiceCollectionExtensions = class
Public Module MongoDBServiceCollectionExtensions
Inheritance
MongoDBServiceCollectionExtensions

Methods

AddMongoDBVectorStore(IServiceCollection, MongoDBVectorStoreOptions, String)

Register a MongoDB Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the MongoDB MongoDB.Driver.IMongoDatabase is retrieved from the dependency injection container.

AddMongoDBVectorStore(IServiceCollection, String, String, MongoDBVectorStoreOptions, String)

Register a MongoDB Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the MongoDB MongoDB.Driver.IMongoDatabase is constructed using the provided connectionString and databaseName.

AddMongoDBVectorStoreRecordCollection<TRecord>(IServiceCollection, String, MongoDBVectorStoreRecordCollectionOptions<TRecord>, String)

Register a MongoDB Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the MongoDB MongoDB.Driver.IMongoDatabase is retrieved from the dependency injection container.

AddMongoDBVectorStoreRecordCollection<TRecord>(IServiceCollection, String, String, String, MongoDBVectorStoreRecordCollectionOptions<TRecord>, String)

Register a MongoDB Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the MongoDB MongoDB.Driver.IMongoDatabase is constructed using the provided connectionString and databaseName.

Applies to