AspireEFMySqlExtensions
Class static net10.0
Provides extension methods for registering a MySQL database context in an Aspire application.
namespace Microsoft.Extensions.Hosting;
public static class AspireEFMySqlExtensions{ // ...}Methods2
Section titled MethodsAddMySqlDbContext(IHostApplicationBuilder, string, Action<PomeloEntityFrameworkCoreMySqlSettings>, 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. EnrichMySqlDbContext(IHostApplicationBuilder, Action<PomeloEntityFrameworkCoreMySqlSettings>)extension Configures retries, health check, logging and telemetry for the
EntityFrameworkCore.DbContext.