Table of Contents

Method CreateDatabase

Namespace
MongoDB.EntityFrameworkCore.Storage
Assembly
MongoDB.EntityFrameworkCore.dll

CreateDatabase(IModel)

Create a new database with the name specified in the connection options.

public bool CreateDatabase(IModel model)

Parameters

model IModel

The IModel that informs how the database should be created.

Returns

bool

true if the database was created from scratch, false if it already existed.

Remarks

If the database already exists only new collections will be created.