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
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
contextLifetime
ServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecks
boolAdd 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
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
serviceName
stringcloud foundry service name binding
contextLifetime
ServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecks
boolAdd steeltoeHealth checks even if community health checks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
MySqlConnection is retrievable as both MySqlConnection and IDbConnection