次の方法で共有


AspireSqlServerEFCoreSqlClientExtensions.EnrichSqlServerDbContext<TContext> Method

Definition

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

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

Type Parameters

TContext

Parameters

Exceptions

Thrown if mandatory builder is null.

Thrown when mandatory DbContext is not registered in DI.

Applies to