Table of Contents

Method CreateDatabase

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

CreateDatabase(IDesignTimeModel)

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

bool CreateDatabase(IDesignTimeModel model)

Parameters

model IDesignTimeModel

The IDesignTimeModel 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.