Class MongoServiceCollectionExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- MongoDB.EntityFrameworkCore.dll
MongoDB-specific extension methods for IServiceCollection.
public static class MongoServiceCollectionExtensions
- Inheritance
-
MongoServiceCollectionExtensions
- Inherited Members
Methods
- AddEntityFrameworkMongoDB(IServiceCollection)
Adds the services required by the MongoDB provider for Entity Framework to an IServiceCollection.
- AddMongoDB<TContext>(IServiceCollection, IMongoClient, string, Action<MongoDbContextOptionsBuilder>?, Action<DbContextOptionsBuilder>?)
Registers the given Entity Framework DbContext as a service in the IServiceCollection and configures it to connect to an MongoDB database.
- AddMongoDB<TContext>(IServiceCollection, string, string, Action<MongoDbContextOptionsBuilder>?, Action<DbContextOptionsBuilder>?)
Registers the given Entity Framework DbContext as a service in the IServiceCollection and configures it to connect to an MongoDB database.