Share via


DesignTimeProviderServicesAttribute 類別

定義

識別要尋找指定資料庫提供者之設計階段服務的位置。 這個屬性應該存在於資料庫提供者的主要元件中。

資料庫提供者通常會使用此屬性, (和其他延伸模組) 。 它通常不會用於應用程式程式碼中。

[System.AttributeUsage(System.AttributeTargets.Assembly)]
public sealed class DesignTimeProviderServicesAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly)>]
type DesignTimeProviderServicesAttribute = class
    inherit Attribute
Public NotInheritable Class DesignTimeProviderServicesAttribute
Inherits Attribute
繼承
DesignTimeProviderServicesAttribute
屬性

建構函式

DesignTimeProviderServicesAttribute(String, String, String)

初始化 DesignTimeProviderServicesAttribute 類別的新執行個體。

屬性

AssemblyName

取得包含設計階段服務的元件名稱。

PackageName

取得包含設計階段服務的 NuGet 套件名稱。

TypeName

取得型別的名稱,這個型別可用來將資料庫提供者設計階段服務新增至 ServiceCollection 。 此類型應該包含具有下列簽章 public IServiceCollection ConfigureDesignTimeServices(IServiceCollection serviceCollection) 的方法。

適用於