自定义.NET数据提供程序自定义、程序、数据、NET

2023-09-04 02:11:28 作者:离人心上秋

时,可以使用自定义.NET数据提供程序,而不在GAC中安装它?

Is is possible to use a custom .NET data provider without installing it in the GAC?

我可以引用自定义DLL和我的配置文件中注册了吗?

Can I reference a custom DLL and register it inside my configuration file?

推荐答案

是,你可以注册一个实施DbProviderFactory一流的加入按照您的配置文件部分:

Yes, you can register an implementation of the DbProviderFactory class by adding the following section in your configuration file:

<system.data>
    <DbProviderFactories>
        <add name="My Custom Data Provider"
             invariant="MyCustomDataProvider" 
             description="Data Provider for My Custom Store" 
             type="MyNamespace.MyCustomProviderFactory, MyCustomDataProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=" />
    </DbProviderFactories>
</system.data>

MyCustomDataProvider 组装不必在GAC中注册的,但可以使用该应用程序作为的

 
精彩推荐
图片推荐