1、SQL Server
<add name="ApplicationName" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
<add name="ApplicationName" connectionString="Data Source=.;Database=Test;User=sa;Password=sa;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient"/>
2、SQL Server Compact
<add name="TestContext" connectionString="Data Source=|DataDirectory|\Test.sdf" providerName="System.Data.SqlServerCe.4.0"/>
3、MySql
<add name="TestContext" connectionString="server=localhost;User Id=root;password=sa;database=test" providerName="MySql.Data.MySqlClient" />
原文链接:https://www.qiquanji.com/post/8354.html
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
微信扫码关注
更新实时通知