Table of Contents

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

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.

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

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.

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

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.

sqlServerOptionsAction Action<object>

An action to allow additional SQL Server specific configuration.

Returns

DbContextOptionsBuilder

The incoming builder so that additional calls can be chained.