Correct configuration scheme for connecting to MySQL database with SubSonic

Source: Internet
Author: User

The following articles mainly describe the correct configuration scheme for connecting to the MySQL database using SubSonic. With the wide application of the MySQL database, the related applications are also paid attention, the following articles mainly introduce the correct configuration scheme for connecting to the MySQL database using SubSonic.

Add SubSonic. dll references to the project;

Add

 
 
  1. <configSections> 
  2. <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/> 
  3. </configSections> 
  4. <connectionStrings> 
  5. <clear/> 
  6. <add name="MySQLDataConnection" connectionString="Data Source=dataserveripornamepipe;Database=database;User ID=username;Password=password"/> 
  7. </connectionStrings> 
  8. <SubSonicService defaultProvider="MySQLData"> 
  9. <providers> 
  10. <clear/>   
  11. <add name="MySQLData" type="SubSonic.MySQLDataProvider,SubSonic" connectionStringName="OracleDataConnection" generatedNamespace="MySQLDataDomain"/> 
  12. </providers> 
  13. </SubSonicService> 

Then SubSonic DAL, refer to http://hi.baidu.com/beloving/blog/item/472d17ce1ed17e3ab600c8a9.html

NOTE: If there are multiple databases or even multiple types of databases in the same project, such as SQL Server + Oracle + MySQL, different namespaces are recommended, in this way, multiple corresponding folders will appear in the Generated directory to store the corresponding data classes.


The above content describes how to use SubSonic to connect to the MySQL database configuration. I hope it will help you in this regard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.