Method AddEntityFrameworkMongoDB
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- MongoDB.EntityFrameworkCore.dll
AddEntityFrameworkMongoDB(IServiceCollection)
Adds the services required by the MongoDB provider for Entity Framework to an IServiceCollection.
public static IServiceCollection AddEntityFrameworkMongoDB(this IServiceCollection serviceCollection)
Parameters
serviceCollectionIServiceCollectionThe IServiceCollection to add services to.
Returns
- IServiceCollection
The same service collection so that multiple calls can be chained.
Remarks
You probably meant to use AddMongoDB<TContext>(IServiceCollection, string, string, Action<MongoDbContextOptionsBuilder>?, Action<DbContextOptionsBuilder>?) instead.