Table of Contents

Class MySqlDbContextOptionsBuilderExtensions

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

Methods

UseMySql(DbContextOptionsBuilder, IServiceProvider)

Configures the DbContext to connect to a MySQL compatible database, using the default service binding.

public static DbContextOptionsBuilder UseMySql(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider)

Parameters

builder DbContextOptionsBuilder

The builder being used to configure the DbContext.

serviceProvider IServiceProvider

The application's configured services.

Returns

DbContextOptionsBuilder

The incoming builder so that additional calls can be chained.

UseMySql(DbContextOptionsBuilder, IServiceProvider, string?)

Configures the DbContext to connect to a MySQL compatible database, using a named service binding.

public static DbContextOptionsBuilder UseMySql(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider, string? serviceBindingName)

Parameters

builder DbContextOptionsBuilder

The builder being used to configure the DbContext.

serviceProvider IServiceProvider

The application's configured services.

serviceBindingName string

The service binding name, or null to use the default service binding.

Returns

DbContextOptionsBuilder

The incoming builder so that additional calls can be chained.

UseMySql(DbContextOptionsBuilder, IServiceProvider, string?, object?, Action<object>?)

Configures the DbContext to connect to a MySQL compatible database, using a named service binding and options.

public static DbContextOptionsBuilder UseMySql(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider, string? serviceBindingName, object? serverVersion, Action<object>? mySqlOptionsAction)

Parameters

builder DbContextOptionsBuilder

The builder being used to configure the DbContext.

serviceProvider IServiceProvider

The application's configured services.

serviceBindingName string

The service binding name, or null to use the default service binding.

serverVersion object

The version of the database server. This only has an effect if the Microting.EntityFrameworkCore.MySql or Pomelo.EntityFrameworkCore.MySql package is being used. Set to null to auto-detect (at the cost of opening an extra connection).

mySqlOptionsAction Action<object>

An action to allow additional MySQL specific configuration.

Returns

DbContextOptionsBuilder

The incoming builder so that additional calls can be chained.