Class MySqlProviderServiceCollectionExtensions
public static class MySqlProviderServiceCollectionExtensions
- Inheritance
-
MySqlProviderServiceCollectionExtensions
- Inherited Members
Methods
AddMySqlConnection(IServiceCollection, IConfiguration, ServiceLifetime, bool)
Add MySql and its IHealthContributor to a ServiceCollection
public static IServiceCollection AddMySqlConnection(this IServiceCollection services, IConfiguration config, ServiceLifetime contextLifetime = ServiceLifetime.Scoped, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
contextLifetimeServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecksboolAdd steeltoeHealth checks even if community health checks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
MySqlConnection is retrievable as both MySqlConnection and IDbConnection
AddMySqlConnection(IServiceCollection, IConfiguration, string, ServiceLifetime, bool)
Add MySql and its IHealthContributor to a ServiceCollection.
public static IServiceCollection AddMySqlConnection(this IServiceCollection services, IConfiguration config, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Scoped, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
serviceNamestringcloud foundry service name binding
contextLifetimeServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecksboolAdd steeltoeHealth checks even if community health checks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
MySqlConnection is retrievable as both MySqlConnection and IDbConnection