Sündmused
17. märts, 21 - 21. märts, 10
Liituge sarjaga, et luua muude arendajate ja ekspertidega skaleeritavad tehisintellektilahendused, mis põhinevad reaalajas kasutusjuhtumitel.
Registreeruge koheSeda brauserit enam ei toetata.
Uusimate funktsioonide, turbevärskenduste ja tehnilise toe kasutamiseks võtke kasutusele Microsoft Edge.
Work with data and resources stored in Azure Database for MySQL.
The recommended client library for accessing Azure Database for MySQL is MySQL's Connector/Net. Use the package to connect to the database and execute SQL statements directly.
Install the NuGet package directly from the Visual Studio Package Manager console or with the .NET Core CLI.
Install-Package MySql.Data
dotnet add package MySql.Data
Connect to a MySQL database and execute a query:
/* Include this "using" directive...
using MySql.Data.MySqlClient;
*/
string connectionString = "Server=[servername].mysql.database.azure.com; " +
"Database=myDataBase; Uid=[userid]@[servername]; Pwd=myPassword;";
// Best practice is to scope the MySqlConnection to a "using" block
using (MySqlConnection conn = new MySqlConnection(connectionString))
{
// Connect to the database
conn.Open();
// Read rows
MySqlCommand selectCommand = new MySqlCommand("SELECT * FROM MyTable", conn);
MySqlDataReader results = selectCommand.ExecuteReader();
// Enumerate over the rows
while(results.Read())
{
Console.WriteLine("Column 0: {0} Column 1: {1}", results[0], results[1]);
}
}
Toote „Azure SDK for .NET“ tagasiside
Azure SDK for .NET on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link:
Sündmused
17. märts, 21 - 21. märts, 10
Liituge sarjaga, et luua muude arendajate ja ekspertidega skaleeritavad tehisintellektilahendused, mis põhinevad reaalajas kasutusjuhtumitel.
Registreeruge kohe