public static async ValueTask <int> ExecuteNonQueryAsync( this MySqlConnection conn, string spName, IEnumerable <MySqlParameter> parameters, MySqlTransaction transaction) { using (var cmd = new ProfiledDbConnection(conn).CreateCommand()) { cmd.CommandText = spName; cmd.CommandType = CommandType.StoredProcedure; cmd.Transaction = transaction; if (parameters != null) { cmd.Parameters.AddRange(parameters.ToArray()); } return(await cmd.ExecuteNonQueryAsync()); } }