Share via


DatabaseModelFactory Class

Definition

Base class used by database providers to reverse engineer a database into a DatabaseModel.

public abstract class DatabaseModelFactory : Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory
type DatabaseModelFactory = class
    interface IDatabaseModelFactory
Public MustInherit Class DatabaseModelFactory
Implements IDatabaseModelFactory
Inheritance
DatabaseModelFactory
Implements

Remarks

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Reverse engineering (scaffolding) an existing database, and EF Core design-time services for more information and examples.

Constructors

DatabaseModelFactory()

Methods

Create(DbConnection, DatabaseModelFactoryOptions)

Connects to the database using the given connection and creates a DatabaseModel for the database.

Create(String, DatabaseModelFactoryOptions)

Connects to the database using the given connection string and creates a DatabaseModel for the database.

Applies to