Table of Contents

Class MongoModelBuilder

Namespace
eQuantic.Core.Data.MongoDb
Assembly
eQuantic.Core.Data.MongoDb.dll

Fluent builder for the MongoModel — one Entity call per mapped type.

public sealed class MongoModelBuilder
Inheritance
MongoModelBuilder
Inherited Members

Methods

Build()

Builds the model. The DI extensions call this for you; call it directly when hosting without DI — the built model is the introspection handle (Explain()).

public MongoModel Build()

Returns

MongoModel

Entity<TEntity>(Action<MongoEntityBuilder<TEntity>>)

Maps TEntity — collection name, id member, element renames, exclusions and value conversions. Applies once per process (the driver's class maps are global and freeze on first use), with the usual precedence: conventions < annotations < fluent.

public MongoModelBuilder Entity<TEntity>(Action<MongoEntityBuilder<TEntity>> configure) where TEntity : class

Parameters

configure Action<MongoEntityBuilder<TEntity>>

The fluent configuration.

Returns

MongoModelBuilder

The same builder for chaining.

Type Parameters

TEntity

The entity type.