title: Insert data in LINQ Database
body: <p>I wonder why I can't insert data into database using LINQ. I created Serviced-Base database. </p>
  
  <p>When I run the program, there is no error, but still no data appears in database table.</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      DataClasses1DataContext ds = new DataClasses1DataContext();
      Customer cst = new Customer();
  
      cst.CustName = textBoxNama.Text;
      cst.Phone = int.Parse(textBoxHP.Text);
      cst.CustAddress = textBoxAlamat.Text;
  
      ds.Customers.InsertOnSubmit(cst);
  
      try
      {
          ds.SubmitChanges();
          MessageBox.Show("Success");
      }
      catch (Exception )
      {   
          throw;
      }
  }
  </code></pre>