Share via


AspireEFPostgreSqlExtensions.EnrichNpgsqlDbContext<TContext> Method

Definition

Configures retries, health check, logging and telemetry for the DbContext.

public static void EnrichNpgsqlDbContext<TContext> (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, Action<Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.NpgsqlEntityFrameworkCorePostgreSQLSettings>? configureSettings = default) where TContext : Microsoft.EntityFrameworkCore.DbContext;
static member EnrichNpgsqlDbContext : Microsoft.Extensions.Hosting.IHostApplicationBuilder * Action<Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.NpgsqlEntityFrameworkCorePostgreSQLSettings> -> unit (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)
<Extension()>
Public Sub EnrichNpgsqlDbContext(Of TContext As DbContext) (builder As IHostApplicationBuilder, Optional configureSettings As Action(Of NpgsqlEntityFrameworkCorePostgreSQLSettings) = Nothing)

Type Parameters

TContext

Parameters

Exceptions

Thrown if mandatory builder is null.

Thrown when mandatory DbContext is not registered in DI.

Applies to