Table of Contents

Method CreateMissingIndexes

Namespace
MongoDB.EntityFrameworkCore
Assembly
MongoDB.EntityFrameworkCore.dll

CreateMissingIndexes(DatabaseFacade)

Creates indexes in the MongoDB database for all IIndex definitions in the EF Core model for which there is not already an index in the database. This method only creates regular, non-Atlas indexes.

public static void CreateMissingIndexes(this DatabaseFacade databaseFacade)

Parameters

databaseFacade DatabaseFacade

The DatabaseFacade from the EF Core DbContext.