Skip to content

Class MongoDbEventSourcingServiceCollectionExtensions

Namespace: Cephalon.EventSourcing.MongoDB.Hosting
Assembly: Cephalon.EventSourcing.MongoDB.dll

Registers the MongoDB event-store provider used by Cephalon hosts.

public static class MongoDbEventSourcingServiceCollectionExtensions

objectMongoDbEventSourcingServiceCollectionExtensions

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

AddCephalonMongoDbEventSourcing(IServiceCollection, string, string, string)

Section titled “ AddCephalonMongoDbEventSourcing(IServiceCollection, string, string, string)”

Adds the MongoDB event-store provider to the service collection.

public static IServiceCollection AddCephalonMongoDbEventSourcing(this IServiceCollection services, string connectionString, string databaseName, string collectionName = "event_streams")

services IServiceCollection

The service collection to extend.

connectionString string

The MongoDB connection string.

databaseName string

The target MongoDB database name.

collectionName string

The MongoDB collection name used for event stream documents. Defaults to event_streams.

IServiceCollection

The same service collection for fluent registration.