Class SqlServerDbContextOptionsBuilderExtensions
- Namespace
- Steeltoe.Connectors.EntityFrameworkCore.SqlServer
- Assembly
- Steeltoe.Connectors.EntityFrameworkCore.dll
public static class SqlServerDbContextOptionsBuilderExtensions
- Inheritance
-
SqlServerDbContextOptionsBuilderExtensions
- Inherited Members
Methods
UseSqlServer(DbContextOptionsBuilder, IServiceProvider)
Configures the DbContext to connect to a Microsoft SQL Server database, using the default service binding.
public static DbContextOptionsBuilder UseSqlServer(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.
UseSqlServer(DbContextOptionsBuilder, IServiceProvider, string?)
Configures the DbContext to connect to a Microsoft SQL Server database, using a named service binding.
public static DbContextOptionsBuilder UseSqlServer(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.
UseSqlServer(DbContextOptionsBuilder, IServiceProvider, string?, Action<object>?)
Configures the DbContext to connect to a Microsoft SQL Server database, using a named service binding and options.
public static DbContextOptionsBuilder UseSqlServer(this DbContextOptionsBuilder builder, IServiceProvider serviceProvider, string? serviceBindingName, Action<object>? sqlServerOptionsAction)
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.sqlServerOptionsActionAction<object>An action to allow additional SQL Server specific configuration.
Returns
- DbContextOptionsBuilder
The incoming
builderso that additional calls can be chained.