To get the connection string from my App.config I write this code:
ConnectionStringSettings settings
= ConfigurationManager.ConnectionStrings["livresEntities"];
string connectString = settings.ConnectionString;
Console.WriteLine("Original: "+ connectString);
The result (I use Data Model .edmx file):
Original: metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;persistsecurityinfo=True;database=livres"
But when I want to change the password or the uid using this line:
MySqlConnectionStringBuilder builder
= new MySqlConnectionStringBuilder(connectString);<br>
It give me the following error:
Keyword not supported
Why? If there is any tutorial on how to secure MySQL's connection string using a Model (.edmx) it will be very helpful for me.