Class SqlServerProviderServiceCollectionExtensions
public static class SqlServerProviderServiceCollectionExtensions
- Inheritance
-
SqlServerProviderServiceCollectionExtensions
- Inherited Members
Methods
AddSqlServerConnection(IServiceCollection, IConfiguration, ServiceLifetime, bool)
Add SQL Server to a ServiceCollection
public static IServiceCollection AddSqlServerConnection(this IServiceCollection services, IConfiguration config, ServiceLifetime contextLifetime = ServiceLifetime.Scoped, bool addSteeltoeHealthChecks = false)
Parameters
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
contextLifetime
ServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecks
boolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
AddSqlServerConnection(IServiceCollection, IConfiguration, string, ServiceLifetime, bool)
Add SQL Server to a ServiceCollection
public static IServiceCollection AddSqlServerConnection(this IServiceCollection services, IConfiguration config, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Scoped, bool addSteeltoeHealthChecks = false)
Parameters
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
serviceName
stringcloud foundry service name binding
contextLifetime
ServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecks
boolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining