title: How I can Insert Data in the MySQL Database?
body: <p>I have a ASP.NET Application and a MySQL Database. I want write a Class to insert,delete and show the Data from the database. I have a Connection to the Database but I can't insert data in the database.</p>
  
  <p>My Class insert method: </p>
  
  <pre><code>public string CreateEntry(string Connectionstring, string mitarbeiter)
  {
      connection = new MySqlConnection(Connectionstring);
      try
      {
          var command = connection.CreateCommand();
          command.CommandText = "INSERT INTO tb_mitarbeiter (Vorname) VALUES ('tom')";
          connection.Open();
          return "Mitarbeiter wurde angelegt";
      }
      catch (Exception ex)
      {
          return ex.Message;
      }
      finally
      {
          connection.Close();
      }
  }
  </code></pre>
  
  <p>The <code>Connectionstring</code> is correct. I don't get a error but there is no data in the database.</p>
  
  <p>My tablename: tb_mitarbeiter
  columns: ID and Vorname</p>