PatShop4.0学习笔记:连接字符串

PatShop4.0学习笔记:连接字符串,第1张

概述 ConnectionString="<%$ ConnectionStrings:SQLConnString %>"   ConfigurationManager.ConnectionStrings["SQLConnString"].ConnectionString;   在项目的类中使用ConfigurationManager,除了添加 using System.Configuration;,还

 ConnectionString="<%$ ConnectionStrings:sqlConnString %>"

 

ConfigurationManager.ConnectionStrings["sqlConnString"].ConnectionString;

 

在项目的类中使用ConfigurationManager,除了添加 using System.Configuration;,还要在类的右击“引用”,添加System.Configuration。

 

 <caching>
   <sqlCacheDependency enabled="true" pollTime="10000">
    <databases>
     <add name="MSPetShop4" connectionStringname="sqlConnString1" pollTime="10000"/>
    </databases>
   </sqlCacheDependency>
  </caching>

<appSettings>   <!-- Pet Shop DAL configuration settings. Possible values: PetShop.sqlServerDAL for sqlServer,PetShop.OracleServerDALfor Oracle. -->   <add key="WebDAL" value="PetShop.sqlServerDAL"/>   <add key="OrdersDAL" value="PetShop.sqlServerDAL"/>   <add key="ProfileDAL" value="PetShop.sqlProfileDAL"/>   <!-- Enable data caching -->   <add key="EnableCaching" value="true"/>   <!-- Cache duration (in hours-whole number only) -->   <add key="categoryCacheDuration" value="12"/>   <add key="ProductCacheDuration" value="12"/>   <add key="ItemCacheDuration" value="12"/>   <!-- Cache dependency options. Possible values: PetShop.tableCacheDependency for sql Server and keep empty for ORACLE -->   <add key="CacheDependencyAssembly" value="PetShop.tableCacheDependency"/>   <!-- CacheDatabasename should match the name under caching section,when using tableCacheDependency -->   <add key="CacheDatabasename" value="MSPetShop4"/>   <!-- *tableDependency Lists table dependency for each instance separated by comma -->   <add key="categorytableDependency" value="category"/>   <add key="ProducttableDependency" value="Product,category"/>   <add key="ItemtableDependency" value="Product,category,Item"/>   <!-- Order processing options (Asynch/Synch) -->   <add key="OrderStrategyAssembly" value="PetShop.BLL"/>   <add key="OrderStrategyClass" value="PetShop.BLL.OrderSynchronous"/>   <!-- Asynchronous Order options -->   <add key="OrderMessaging" value="PetShop.MSMQMessaging"/>   <add key="OrderQueuePath" value="Formatname:DIRECT=OS:Machinename\Private$\PSOrders"/>   <!-- Application Error Log -->   <add key="Event Log Source" value=".NET Pet Shop 4.0"/>  </appSettings>

总结

以上是内存溢出为你收集整理的PatShop4.0学习笔记:连接字符串全部内容,希望文章能够帮你解决PatShop4.0学习笔记:连接字符串所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/1180232.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存