Class MongoDbProviderServiceCollectionExtensions
public static class MongoDbProviderServiceCollectionExtensions
- Inheritance
-
MongoDbProviderServiceCollectionExtensions
- Inherited Members
Methods
AddMongoClient(IServiceCollection, IConfiguration, ServiceLifetime, bool)
Add MongoDb to a ServiceCollection
public static IServiceCollection AddMongoClient(this IServiceCollection services, IConfiguration config, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
contextLifetimeServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecksboolAdd Steeltoe healthChecks
Returns
- IServiceCollection
IServiceCollection for chaining
AddMongoClient(IServiceCollection, IConfiguration, string, ServiceLifetime, bool)
Add MongoDb to a ServiceCollection
public static IServiceCollection AddMongoClient(this IServiceCollection services, IConfiguration config, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
serviceNamestringcloud foundry service name binding
contextLifetimeServiceLifetimeLifetime of the service to inject
addSteeltoeHealthChecksboolAdd Steeltoe healthChecks
Returns
- IServiceCollection
IServiceCollection for chaining