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
builderDbContextOptionsBuilderThe builder being used to configure the DbContext.
serviceProviderIServiceProviderThe application's configured services.
Returns
- DbContextOptionsBuilder
The incoming
builderso 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
builderDbContextOptionsBuilderThe builder being used to configure the DbContext.
serviceProviderIServiceProviderThe application's configured services.
serviceBindingNamestringThe service binding name, or
nullto use the default service binding.
Returns
- DbContextOptionsBuilder
The incoming
builderso 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
builderDbContextOptionsBuilderThe builder being used to configure the DbContext.
serviceProviderIServiceProviderThe application's configured services.
serviceBindingNamestringThe service binding name, or
nullto use the default service binding.serverVersionobjectThe 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
nullto auto-detect (at the cost of opening an extra connection).mySqlOptionsActionAction<object>An action to allow additional MySQL specific configuration.
Returns
- DbContextOptionsBuilder
The incoming
builderso that additional calls can be chained.