title: How to insert all C# object values to MySQL table in one query?
body: <p>I have an object with many parameters, each represents a column in the MySQL table.</p>
  <p>I have a code which generates a new object with all the above parameters and their values:</p>
  <pre><code>foreach (MetaData metaData in elnetMcMapping.DataItems) {
      var value = metaData.Value[0] * metaData.Multiplier;
      Type type = mcReadings.GetType();
      PropertyInfo prop = type.GetProperty(metaData.Label);
      prop.SetValue(mcReadings, value, null);
  }
  </code></pre>
  <p>Now I want to insert all the values to the MySql table as a new row but not sure how to dynamically implement the below logic:</p>
  <pre><code>INSERT INTO table_name (column1, column2, column3, ...)
  VALUES (value1, value2, value3, ...);
  </code></pre>
  <p>I am looking for something like this:</p>
  <pre><code>await dataAccess.SaveData(&quot;insert into&quot;, mcReadings, DeviceDb);
  </code></pre>
  <p>Does anyone have a code example to help me with this ?</p>