語言

IDatabaseModelFactory 介面

定義

通常由資料庫提供者實作,用以將資料庫逆向工程成 DatabaseModel。

public interface IDatabaseModelFactory
type IDatabaseModelFactory = interface
Public Interface IDatabaseModelFactory
衍生

備註

服役期間為 Scoped。 這表示每個 DbContext 實例都會使用自己的服務實例。 實作方式可能取決於其他註冊於任何生命週期的服務。 實作不需要執行緒安全。

更多資訊與範例請參閱 「逆向工程(支架)」現有資料庫及 EF Core 設計時服務 。

方法

名稱 Description
Create(DbConnection, DatabaseModelFactoryOptions)

利用該連線連接到資料庫,並為資料庫建立 a DatabaseModel 。

Create(DbConnection, IEnumerable<String>, IEnumerable<String>)

利用該連線連接到資料庫,並為資料庫建立 a DatabaseModel 。

Create(String, DatabaseModelFactoryOptions)

使用 連接字串 連接資料庫,並為資料庫建立 aDatabaseModel。

Create(String, IEnumerable<String>, IEnumerable<String>)

使用 連接字串 連接資料庫,並為資料庫建立 aDatabaseModel。

Create(String, TableSelectionSet)

通常由資料庫提供者實作,用以將資料庫逆向工程成 DatabaseModel。

適用於