Table of Contents

Class MongoDbProviderServiceCollectionExtensions

Namespace
Steeltoe.CloudFoundry.Connector.MongoDb
Assembly
Steeltoe.CloudFoundry.ConnectorCore.dll
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

services IServiceCollection

Service collection to add to

config IConfiguration

App configuration

contextLifetime ServiceLifetime

Lifetime of the service to inject

addSteeltoeHealthChecks bool

Add 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

services IServiceCollection

Service collection to add to

config IConfiguration

App configuration

serviceName string

cloud foundry service name binding

contextLifetime ServiceLifetime

Lifetime of the service to inject

addSteeltoeHealthChecks bool

Add Steeltoe healthChecks

Returns

IServiceCollection

IServiceCollection for chaining