Table of Contents

Class MongoDbMaterializedViewExtensions

Namespace
Excalibur.Data.MongoDB.MaterializedViews
Assembly
Excalibur.Data.MongoDB.dll

Extension methods for registering MongoDB materialized view store.

public static class MongoDbMaterializedViewExtensions
Inheritance
MongoDbMaterializedViewExtensions
Inherited Members

Methods

UseMongoDb(IMaterializedViewsBuilder, Action<MongoDbMaterializedViewStoreOptions>)

Configures the materialized view store to use MongoDB.

public static IMaterializedViewsBuilder UseMongoDb(this IMaterializedViewsBuilder builder, Action<MongoDbMaterializedViewStoreOptions> configure)

Parameters

builder IMaterializedViewsBuilder

The materialized views builder.

configure Action<MongoDbMaterializedViewStoreOptions>

Action to configure MongoDB options.

Returns

IMaterializedViewsBuilder

The builder for fluent configuration.

Examples

services.AddMaterializedViews(builder =>
{
    builder.UseMongoDb(options =>
    {
        options.ConnectionString = "mongodb://localhost:27017";
        options.DatabaseName = "myapp";
    });
});

UseMongoDb(IMaterializedViewsBuilder, string, string)

Configures the materialized view store to use MongoDB with a connection string.

public static IMaterializedViewsBuilder UseMongoDb(this IMaterializedViewsBuilder builder, string connectionString, string databaseName)

Parameters

builder IMaterializedViewsBuilder

The materialized views builder.

connectionString string

The MongoDB connection string.

databaseName string

The database name.

Returns

IMaterializedViewsBuilder

The builder for fluent configuration.

Examples

services.AddMaterializedViews(builder =>
{
    builder.UseMongoDb("mongodb://localhost:27017", "myapp");
});