AspireEFPostgreSqlExtensions
Class static net10.0
Provides extension methods for registering a PostgreSQL database context in an Aspire application.
namespace Microsoft.Extensions.Hosting;
public static class AspireEFPostgreSqlExtensions{ // ...}Methods2
Section titled MethodsAddNpgsqlDbContext(IHostApplicationBuilder, string, Action<NpgsqlEntityFrameworkCorePostgreSQLSettings>, Action<DbContextOptionsBuilder>)extension Registers the given
EntityFrameworkCore.DbContext as a service in the services provided by the builder. Enables db context pooling, retries, corresponding health check, logging and telemetry. EnrichNpgsqlDbContext(IHostApplicationBuilder, Action<NpgsqlEntityFrameworkCorePostgreSQLSettings>)extension Configures retries, health check, logging and telemetry for the
EntityFrameworkCore.DbContext.