語言

EntityFrameworkServicesBuilder.TryAddProviderSpecificServices 方法

定義

資料庫提供者應呼叫此方法以存取底層 ServiceCollectionMap ,以便註冊提供者專屬服務。 請注意,實體框架服務的實作應直接註冊於 Entity EntityFrameworkServicesBuilder Deck,而非透過此方法。

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAddProviderSpecificServices(Action<Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap> serviceMap);
abstract member TryAddProviderSpecificServices : Action<Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
override this.TryAddProviderSpecificServices : Action<Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
Public Overridable Function TryAddProviderSpecificServices (serviceMap As Action(Of ServiceCollectionMap)) As EntityFrameworkServicesBuilder

參數

serviceMap
Action<ServiceCollectionMap>

應該加入哪些提供者服務的底層地圖。

傳回

此建構器,使得後續呼叫可以串聯。

備註

更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。

適用於