FineUI 官方论坛
标题:
关于SubSonic使用多个数据源的配置
[打印本页]
作者:
奋斗~
时间:
2013-1-6 04:56
标题:
关于SubSonic使用多个数据源的配置
====================Web.Config=============START======
<configSections>
<section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/>
</configSections>
<appSettings/>
<connectionStrings configSource="connectionStrings.config"/>
<SubSonicService defaultProvider="Northwind">
<providers>
<clear/>
<add name="Northwind" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="Northwind" generatedNamespace="Northwind"/>
<add name="Southwind" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="Northwind" generatedNamespace="Southwind"/>
</providers>
</SubSonicService>
====================Web.Config============END=======
====================connectionStrings.config==========START=============
<connectionStrings>
<add name="Northwind" connectionString="Data Source=(local); Database=Northwind; Integrated Security=true;"/>
<add name="Southwind" connectionString="Data Source=(local); Database=Northwind; Integrated Security=true;"/>
</connectionStrings>
====================connectionStrings.config==============END=========
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/)
Powered by Discuz! X3.4