Skip to content

Class MongoDbDataEngineBuilderExtensions

Namespace: Cephalon.Data.MongoDB.Registration
Assembly: Cephalon.Data.MongoDB.dll

Registers the MongoDB data companion pack with an .

public static class MongoDbDataEngineBuilderExtensions

objectMongoDbDataEngineBuilderExtensions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

AddMongoDbData(EngineBuilder, string, string, Action<MongoDbDataOptions>?)

Section titled “ AddMongoDbData(EngineBuilder, string, string, Action<MongoDbDataOptions>?)”

Adds the MongoDB data pack with the supplied connection string and database name.

public static EngineBuilder AddMongoDbData(this EngineBuilder builder, string connectionString, string databaseName, Action<MongoDbDataOptions>? configure = null)

builder EngineBuilder

The engine builder to extend.

connectionString string

The MongoDB connection string.

databaseName string

The target MongoDB database name.

configure Action<MongoDbDataOptions>?

An optional callback that configures the host-owned MongoDB pack options.

EngineBuilder

The same engine builder for fluent composition.

Register outbox or inbox support by configuring or in the configure callback.

AddMongoDbData(EngineBuilder, Action<MongoDbDataOptions>)

Section titled “ AddMongoDbData(EngineBuilder, Action<MongoDbDataOptions>)”

Adds the MongoDB data pack using an options callback that can bind from configuration.

public static EngineBuilder AddMongoDbData(this EngineBuilder builder, Action<MongoDbDataOptions> configure)

builder EngineBuilder

The engine builder to extend.

configure Action<MongoDbDataOptions>

The callback that configures the host-owned MongoDB pack options, including , , and .

EngineBuilder

The same engine builder for fluent composition.

Use either or . Leaving both unset falls back to mongodb://localhost:27017.