AspireMongoDBEntityFrameworkCoreExtensions
Class static net9.0
Extension methods for configuring EntityFrameworkCore DbContext to a MongoDB database
namespace Microsoft.Extensions.Hosting;
public static class AspireMongoDBEntityFrameworkCoreExtensions{ // ...}Methods2
Section titled MethodsAddMongoDbContext(IHostApplicationBuilder, string, string?, Action<MongoDBEntityFrameworkCoreSettings>, Action<DbContextOptionsBuilder>)extension Registers the given
EntityFrameworkCore.DbContext as a service in the services provided by the builder. Enables db context pooling, retries, health check, logging and telemetry for the EntityFrameworkCore.DbContext. EnrichMongoDbContext(IHostApplicationBuilder, Action<MongoDBEntityFrameworkCoreSettings>)extension Configures logging and telemetry for the
EntityFrameworkCore.DbContext.