Table of Contents

Method CreateModelBuilder

Namespace
MongoDB.EntityFrameworkCore.Metadata.Conventions
Assembly
MongoDB.EntityFrameworkCore.dll

CreateModelBuilder()

Call this method to build a ModelBuilder for MongoDB outside of OnModelCreating(ModelBuilder).

public static ModelBuilder CreateModelBuilder()

Returns

ModelBuilder

The model builder with this convention set.

Remarks

Note that it is unusual to use this method. Consider using DbContext in the normal way instead.

CreateModelBuilder<T>()

Call this method to build a ModelBuilder for MongoDB outside of OnModelCreating(ModelBuilder).

public static ModelBuilder CreateModelBuilder<T>() where T : DbContext

Returns

ModelBuilder

The model builder with this convention set.

Type Parameters

T

Remarks

Note that it is unusual to use this method. Consider using DbContext in the normal way instead.