DatabaseProvider<TProviderServices,TOptionsExtension> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
資料庫提供者主要能告訴 EF 已選中符合當前情境,並提供其運作所需的服務。
此類型通常由資料庫提供者(及其他擴充功能)使用。 它通常不被用於應用程式程式碼中。
public class DatabaseProvider<TProviderServices,TOptionsExtension> : Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider where TProviderServices : class, IDatabaseProviderServices where TOptionsExtension : class, IDbContextOptionsExtension
type DatabaseProvider<'ProviderServices, 'OptionsExtension (requires 'ProviderServices : null and 'ProviderServices :> IDatabaseProviderServices and 'OptionsExtension : null and 'OptionsExtension :> IDbContextOptionsExtension)> = class
interface IDatabaseProvider
Public Class DatabaseProvider(Of TProviderServices, TOptionsExtension)
Implements IDatabaseProvider
類型參數
- TProviderServices
EF 為資料庫提供者運作所需的基本服務集合。
- TOptionsExtension
資料庫提供者會新增 Extensions 的選項類型,以識別已選取的項目(以及儲存其資料庫特定的設定)。
- 繼承
-
DatabaseProvider<TProviderServices,TOptionsExtension>
- 實作
建構函式
| 名稱 | Description |
|---|---|
| DatabaseProvider<TProviderServices,TOptionsExtension>() |
資料庫提供者主要能告訴 EF 已選中符合當前情境,並提供其運作所需的服務。 此類型通常由資料庫提供者(及其他擴充功能)使用。 它通常不被用於應用程式程式碼中。 |
方法
| 名稱 | Description |
|---|---|
| GetProviderServices(IServiceProvider) |
取得 EF 為資料庫提供者運作所需的基本服務集合。 |
| IsConfigured(IDbContextOptions) |
會獲得一個值,表示該資料庫提供者是否已被選中以符合特定情境。 |