Table of Contents

Class MySqlProviderServiceCollectionExtensions

Namespace
Steeltoe.Connector.MySql
Assembly
Steeltoe.Connector.ConnectorCore.dll
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 IServiceCollection

Service collection to add to

config IConfiguration

App configuration

contextLifetime ServiceLifetime

Lifetime of the service to inject

addSteeltoeHealthChecks bool

Add 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 IServiceCollection

Service collection to add to

config IConfiguration

App configuration

serviceName string

cloud foundry service name binding

contextLifetime ServiceLifetime

Lifetime of the service to inject

addSteeltoeHealthChecks bool

Add steeltoeHealth checks even if community health checks exist

Returns

IServiceCollection

IServiceCollection for chaining

Remarks

MySqlConnection is retrievable as both MySqlConnection and IDbConnection