tags:

views:

8

answers:

0

hi friends,upto now i am using mysql database using c# to a edit a row to the table.Bu now i have implemented LinqToMySql for wpf.Bu i can insert a row to the table through linq but i cannot edit that row .my edit code is as follows.

Order row;
public EditOrder(Order row1)
{
        InitializeComponent();
         this.row = row1;
          this.DataContext = row;

}

private void EditOrderBtn_Click(object sender, RoutedEventArgs e)
{
        db.Order.InsertOnSubmit(row);

        this.Close();
}

But it does not any error but the record is not updated in the table.please give me a exact code to submit the changes to the table.