When storing a MySQL connection string in App.config, what value should the providerName property be set to?
For example in the below App.config file, what value should I use for the providerName? Does it matter?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="MySQL" connectionString="SERVER=8.8.8.8; DATABASE=foo; UID=bar; PASSWORD=foobar" providerName="WhatGoesHere?" />
</connectionStrings>
</configuration>
Try this:
<connectionStrings>
<add name="MySQL" connectionString="SERVER=8.8.8.8; DATABASE=foo; UID=bar; PASSWORD=foobar" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
来源:https://stackoverflow.com/questions/13607334/when-storing-a-mysql-connection-string-in-app-config-what-value-should-the-prov