Share via


AspireSqlServerEFCoreSqlClientExtensions Class

Definition

Extension methods for configuring EntityFrameworkCore DbContext to Azure SQL, MS SQL server

public static class AspireSqlServerEFCoreSqlClientExtensions
type AspireSqlServerEFCoreSqlClientExtensions = class
Public Module AspireSqlServerEFCoreSqlClientExtensions
Inheritance
AspireSqlServerEFCoreSqlClientExtensions

Methods

AddSqlServerDbContext<TContext>(IHostApplicationBuilder, String, Action<MicrosoftEntityFrameworkCoreSqlServerSettings>, Action<DbContextOptionsBuilder>)

Registers the given DbContext as a service in the services provided by the builder. Enables db context pooling, retries, health check, logging and telemetry for the DbContext.

EnrichSqlServerDbContext<TContext>(IHostApplicationBuilder, Action<MicrosoftEntityFrameworkCoreSqlServerSettings>)

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

Applies to