Could you help me figure out why you're giving this error?
Code:
using (_connection = new MySqlConnection("Database=test;Data Source=localhost;User Id=root;Password=teste;SslMode=None;"))
{
_connection.Open();
var cmd = new MySqlCommand("select name from user where id=1", _connection);
using (var reader = cmd.ExecuteReader())
{
if (reader.Read())
{
textBlock.Text = (reader.GetString("name"));
}
}
}