Table of Contents

Class MySqlServiceCollectionExtensions

Namespace
Steeltoe.Connectors.MySql
Assembly
Steeltoe.Connectors.dll
public static class MySqlServiceCollectionExtensions
Inheritance
MySqlServiceCollectionExtensions
Inherited Members

Methods

AddMySql(IServiceCollection, IConfiguration)

Registers a ConnectorFactory<TOptions, TConnection> (with type parameters MySqlOptions and MySqlConnector.MySqlConnection or MySql.Data.MySqlClient.MySqlConnection) to connect to a MySQL compatible database.

public static IServiceCollection AddMySql(this IServiceCollection services, IConfiguration configuration)

Parameters

services IServiceCollection

The IServiceCollection to add services to.

configuration IConfiguration

The IConfiguration to read application settings from.

Returns

IServiceCollection

The incoming services so that additional calls can be chained.

AddMySql(IServiceCollection, IConfiguration, Action<ConnectorAddOptionsBuilder>?)

Registers a ConnectorFactory<TOptions, TConnection> (with type parameters MySqlOptions and MySqlConnector.MySqlConnection or MySql.Data.MySqlClient.MySqlConnection) to connect to a MySQL compatible database.

public static IServiceCollection AddMySql(this IServiceCollection services, IConfiguration configuration, Action<ConnectorAddOptionsBuilder>? addAction)

Parameters

services IServiceCollection

The IServiceCollection to add services to.

configuration IConfiguration

The IConfiguration to read application settings from.

addAction Action<ConnectorAddOptionsBuilder>

An optional delegate to configure this connector.

Returns

IServiceCollection

The incoming services so that additional calls can be chained.