Class SqlServerProviderServiceCollectionExtensions
- Namespace
- Steeltoe.CloudFoundry.Connector.SqlServer
- Assembly
- Steeltoe.CloudFoundry.ConnectorCore.dll
public static class SqlServerProviderServiceCollectionExtensions
- Inheritance
-
SqlServerProviderServiceCollectionExtensions
- Inherited Members
Methods
AddSqlServerConnection(IServiceCollection, IConfiguration, ServiceLifetime, ILoggerFactory, bool)
Add SQL Server to a ServiceCollection
public static IServiceCollection AddSqlServerConnection(this IServiceCollection services, IConfiguration config, ServiceLifetime contextLifetime = ServiceLifetime.Scoped, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
contextLifetimeServiceLifetimeLifetime of the service to inject
logFactoryILoggerFactorylogger factory
addSteeltoeHealthChecksboolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
AddSqlServerConnection(IServiceCollection, IConfiguration, string, ServiceLifetime, ILoggerFactory, bool)
Add SQL Server to a ServiceCollection
public static IServiceCollection AddSqlServerConnection(this IServiceCollection services, IConfiguration config, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Scoped, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
serviceNamestringcloud foundry service name binding
contextLifetimeServiceLifetimeLifetime of the service to inject
logFactoryILoggerFactorylogger factory
addSteeltoeHealthChecksboolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining