Table of Contents

Class SqlServerServiceCollectionExtensions

Namespace
Steeltoe.Connectors.SqlServer
Assembly
Steeltoe.Connectors.dll
public static class SqlServerServiceCollectionExtensions
Inheritance
SqlServerServiceCollectionExtensions
Inherited Members

Methods

AddSqlServer(IServiceCollection, IConfiguration)

Registers a ConnectorFactory<TOptions, TConnection> (with type parameters SqlServerOptions and Microsoft.Data.SqlClient.SqlConnection or System.Data.SqlClient.SqlConnection) to connect to a SQL Server database.

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

Parameters

services IServiceCollection

The Microsoft.Extensions.DependencyInjection.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.

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

Registers a ConnectorFactory<TOptions, TConnection> (with type parameters SqlServerOptions and Microsoft.Data.SqlClient.SqlConnection or System.Data.SqlClient.SqlConnection) to connect to a SQL Server database.

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

Parameters

services IServiceCollection

The Microsoft.Extensions.DependencyInjection.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.