You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd.CommandText="INSERT INTO data (some_field) VALUES (@p)";
28
+
cmd.Parameters.AddWithValue("p", "Hello world");
29
+
awaitcmd.ExecuteNonQueryAsync();
30
+
}
31
+
32
+
// Retrieve all rows
33
+
using (varcmd=newMySqlCommand("SELECT some_field FROM data", conn))
34
+
using (varreader=awaitcmd.ExecuteReaderAsync())
35
+
while (awaitreader.ReadAsync())
36
+
Console.WriteLine(reader.GetString(0));
37
+
}
38
+
```
39
+
40
+
You can find more info about the ADO.NET API in the [MSDN documentation](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/ado-net-overview) or in many tutorials on the Internet.
0 commit comments