<configSections> <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" /> </configSections> <connectionStrings> <add name="A" connectionString="server=127.0.0.1;database=A;user id=A;password=A;max pool size=300;" providerName="System.Data.SqlClient" /> <add name="B" connectionString="server=127.0.0.1;database=B;user id=B;password=B;max pool size=300;" providerName="System.Data.SqlClient" /> </connectionStrings> <SubSonicService defaultProvider="A"> <providers> <clear /> <add name="A" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="A" generatedNamespace="Model.A" /> <add name="B" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="B" generatedNamespace="Model.B"/> </providers> </SubSonicService>
SubSonic 配置多个数据库,工作中用到的。记录一下方便以后使用
时间: 2024-10-12 20:44:34